Traceback (most recent call last): File "qimingpian.py", line 126, in <module> qimingpian().get_content() File "qimingpian.py", line 112, in get_content element.find_element_by_xpath('//*[@class="btn-next"]').click() File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/webelement.py", line 628, in _execute return self._parent.execute(command, params) File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/webdriver.py", line 314, in execute self.error_handler.check_response(response) File "/usr/lib/python3.4/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point (771, 571). Other element would receive the click: ... (Session info: headless chrome=66.0.3359.181) (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 3.10.0-514.26.2.el7.x86_64 x86_64)
设置如下还是没有反应 element = WebDriverWait(self.driver, 10).until(EC.presence_of_element_located((By.XPATH, '//[@class="btn-next"]'))) element.find_element_by_xpath('//[@class="btn-next"]').click()
1
xuegj1010 2018-07-19 20:34:03 +08:00
换成 enter 试试看呢?
|
3
nature91 2018-07-20 10:42:30 +08:00
is not clickable 这玩意可点击? 能不用 xpath 少用 xpath ID NAME 之类的直接用
|