How do I swipe to next scrren or tap on small dot button located on above home screen


#1

Hi,

Can some one help me to know how do I swipe to next screen or tap on a button , in Samsung galaxy S6 will get two dot button, when tap on either one will change the screen from 1to 2 vice versa, but Katalon object spy is not able to read the properties of this two dot buttons, Please do find in screenshot…
How do I tap
How do I swipe

please help me


#2

Hi @satish1607,

Here are some instructions on how to do swiping on mobile:

Hope this helps,

Chris


#3

Thanks for the update but nothing is happening on screen while executing the
Mobile.swipe(200, 300, 400, 600) commands

please do let me know exactly how it works my job is to swipe left or right to next screen

regards
Satish


#4

Hi @satish1607,

Could you please share what you have in your test script so far?

Thanks,

Chris


#5

Hi Chris,

You can see on attached screenshot in Galaxy S6 I have go to screen, From Home once I will tap on AppView button 1st screen will open(1in screenshot) then I can tap on dot or swipe left by hand to move to other screen, Similiraly from screen 2(2nd in screenshot) I can swipe right to come to the 1st screen.

SpyMobile or Recorder is not able to identify this two dots its coming out of frame.

So please do let me know how I can achieve this
Mobile height and weidth is 2560x1440. To move to other screen what value I should give in Swipe (x,x,x,x)

Thanks


#6

Hi @satish1607,

I tried a really simple example for swiping on the Android home screen, and this worked for me:

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

// Need to choose some apk to start things off 
Mobile.startApplication('sometestapp.apk', true)

// Close the apk and get back to the home screen
Mobile.pressBack()

// Swiping right to left
Mobile.swipe(1200, 100, 10, 100)
// NOTE: if you're using an older version of Katalon Studio, the 3rd and 4th parameters are *relative* coordinates
// Mobile.swipe(1200, 100, -1000, 0)

// Swiping left to right (the 3rd and 4th parameters are *relative* coordinates to the starting point)
Mobile.swipe(10, 100, 1200, 100)
// NOTE: if you're using an older version of Katalon Studio, the 3rd and 4th parameters are *relative* coordinates
// Mobile.swipe(10, 100, 1000, 0)

Mobile.delay(10)

Mobile.closeApplication()

Hope this helps,

Chris


#7

Thanks Chris for the help, Still I am unable to make it work, Horizontal swipe is working when I open the Chrom browser with long page then able to swipe but

When list of icon open and I need to swipe from right to left or left to right not able to swipe don’t know why.

Please find my testcase below in screenshot.


#8

Hi @satish1607,

For the Swipe command, can you try a couple of things:

  • Switch the coordinates to 1300; 500; 0; 500
  • If that doesn’t work, switch them to 1300; 500; -1000; 0

I’m hoping that one of these will work with the coordinates of your phone.

– Chris


#9

Thanks Chris it worked for me, by following below code.

//For left to right swipe
Mobile.swipe(1300, 500, 0, 500, FailureHandling.CONTINUE_ON_FAILURE)

//for right to left swipe.
Mobile.swipe(0, 500, 1300, 500)

Thanks Again. Cheers