http://www.testclass.net/selenium_python/mouse-event
定位元素失败,提示
改成使用通过xpath定位,问题解决
1、打开百度首页,点击F12,如图操作
2、右击-Copy-Copy XPath,获得 //*[@id="s-usersetting-top"]
3、将获得的XPath内的双引号改成单引号即可
above = driver.find_element_by_xpath("//*[@id='s-usersetting-top']")