openatx / facebook-wda

Facebook WebDriverAgent Python Client Library (not official)
MIT License
1.72k stars 266 forks source link

tap method has a bug #44

Closed leikdga closed 5 years ago

leikdga commented 6 years ago

Hi,

I found that when I use wda_session.tap(x, y) method on my iPad, there is a 50% difference.

For example, if I want to tap (100, 200) on my iPad screen, I have to use wda_session.tap(50, 100).

I have to add a new function to my code like this:

def click(wda_session, x, y):
    '''
    wda has a bug
    '''
    wda_session.tap(x//2, y//2)
codeskyblue commented 6 years ago

Maybe it is not a bug, this just what wda looks like

leikdga commented 6 years ago

Is there any reason for this feature?

codeskyblue commented 6 years ago

I donot know. iOS device always has a scale. some is 2x(Like your ipad), some device is 3x

codeskyblue commented 5 years ago

Refs: https://github.com/openatx/facebook-wda/issues/52