通过UIautomator定位报错
来源:1-16 通过UIAutomator进行定位用户信息

慕神6633432
2018-06-24
def login_by_uiautomator():
driver.find_element_by_android_uiautomator('new UiSelector().text("手机号/邮箱")').clear()
driver.find_element_by_android_uiautomator('new UiSelector().text("手机号/邮箱")').send_keys('18513199587')
driver.find_element_by_android_uiautomator('new UiSelector().resource-id("cn.com.open.mooc:id/password_edit")').send_keys('111111')
报错:
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.
2回答
-
Mushishi
2018-07-11
在python里“”,‘’都说标识字符串的意思,如果你都用单引号和双引号都可以,只是需要转义,你多层的时候转义一下就行。
00 -
Mushishi
2018-06-25
粗心大意。仔细看看写的字母。这个定位字母必须必须一样。
022018-07-08
相似问题