appium填坑
首次使用appium web driver,不说搭建环境的麻烦,初次写完一个操作计算器的程序,但是运行一直报错:selenium.common.exceptions.WebDriverException: Message: The URL '/wd/hub//session' did not map to a valid resource。查了好多百度资料,也没找到原因。最后发现是driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub/', desired_caps),多写了一个“/”,这也太不智能了。
改完后又出现另一个问题:WebDriverException: Message: Parameters were incorrect. We wanted {"required":["desiredCapabilities"],"optional":["requiredCapabilities","sessionId","id"]} and you sent ["capabilities","desiredCapabilities"]。百度了一圈之后,才发现原来是selenium的版本太高了,把selenium版本降为3.0.1就好了。
Henry