iOS automated testing process, often encounter can not pass d, name or xpath problem of positioning elements, then how to solve this problem?
There are two ways can be:
1、TouchAction(self.driver).press(x=0, y=466).release().perform()
Need to import TouchAction () method when using this method, namely:
from appium.webdriver.common.touch_action import TouchAction
So how to get the coordinates is it?
Open appium, connected to the app, and then click on a particular element may be an element displaying specific coordinates x, y
2、self.driver.tap([(249,466)],500)
Use self.driver.tap ([(249,466)], 500) why sometimes still can not locate elements of it? Solutions are as follows:
In self.driver.tap ([(249,466)], 500) preceded by the sleep time, namely:
time.sleep(1)
self.driver.tap([(249,466)],500)
How to get the coordinates of it?
1 in the same method