0

I can't find the correct "X" and "Y" coordinate. when I enter the "X" and "Y" coordinate it will scroll the top menu bar.now I am using tablet phone.

Krishna Sagar
  • 11
  • 3
  • 10

2 Answers2

1

This might help for iOS swipe function

https://medium.com/@manishboricha308/ios-mobile-swipe-action-in-katalon-studio-4911199679e

For Android you can create another @Keyword custom

@Keyword
    def swipeLeft(){

        TouchAction touch = new TouchAction(getCurrentSessionMobileDriver())
        int device_Height, device_Width
        device_Height = Mobile.getDeviceHeight()
        println device_Height
        device_Width = Mobile.getDeviceWidth()
        println device_Width
        int midheight = device_Height/2
        println midheight
        int midwidth = device_Width/2
        println midwidth
        int startX,startY,endX,endY
        startX = device_Width-100
        startY = midheight
        endX = -startX
        endY = 0
        Mobile.swipe(startX,startY,endX,endY)
        touch.tap(startX, startY).perform()

    }
0

When You SpyMobile Your device, and mark object You want to swipe or scroll on You will notice properties window filed. There are X and Y also Height (H) and Width (W). X and Y are absolute co-ordinates to the top left corner of the object. H and W are the size of an object. So You do a simple calculation to see co-ordinates for rest of corners of the object. With this You know space You want to swipe or scroll on.

Hope it works for You.

Jatoonema
  • 1
  • 2