0

Im just working with codeceptjs and using appium driver for testing android application. Now i have different issues with this framework. Im currently working for a test, where i have to use swipeLeft, but it isnt working, there is nothing happen when that function is calling, also swipe, swipeRight, swipeUp, swipeDown. Has anyone already solved this problem or can i use alternatively a back() function or something?

Brainfail
  • 196
  • 1
  • 2
  • 11

3 Answers3

1

Use the following syntax to make your code work:

I.executeScript('mobile: swipe', {direction: 'left'});
sɐunıɔןɐqɐp
  • 3,332
  • 15
  • 36
  • 40
timmcliu
  • 1,769
  • 1
  • 13
  • 12
0

Have you consider Touch Perform (or Action) ? It is working for me

john
  • 413
  • 7
  • 16
0

I have used webdriverio and it seems like Codeceptjs have similarities with their implementations of appium methods for mobile automation.

Are you testing using Android or iOS device?

Have you tried using different method overrides for Swipes? On my experience, iOS and Android have different Speed and Offset settings you need to adjust the values until you get the swipe action working.

And of course you need to make sure you are selecting the appropriate View/Slider/Element that is scrollable, otherwise swipe will fail.

https://codecept.io/helpers/Appium

enter image description here

batuzai04123
  • 379
  • 5
  • 12
  • I tested almost all with different parameters and made sure that my view/slider/element is scrollable, but there happens nothing. I already tried to use `swipe` on iOS and Android with the same application. – Brainfail Oct 21 '19 at 06:14