Could not parse UiSelector argument: 'XXX' is not a string 错误解决办法

ebDriverWait(driver,20).until(EC.visibility_of_element_located((MobileBy.ANDROID_UIAUTOMATOR,new UiSelector().text("我的柠檬")'))).click()

 

报错:

Message: Could not parse UiSelector argument: ‘xxxxxxxxx’ is not a string

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

posted @ 2019-04-02 21:50  云烟三渺  阅读(938)  评论(0)    收藏  举报