Could not parse UiSelector argument: 'XXX' is not a string

driver.find_element_by_android_uiautomator('new UiSelector().text("手机号/邮箱")').send_keys("12111")
driver.find_element_by_android_uiautomator("new UiSelector().resourceId('cn.com.open.mooc:id/password_edit')").send_keys("21003")

报错:

Message: Could not parse UiSelector argument: ‘cn.com.open.mooc:id/password_edit’ is not a string

解决方案:
外侧用 ‘’ (单引号) ,里面的字符串用 " " (双引号)

猜你喜欢

转载自blog.csdn.net/qq544649790/article/details/83960311