我正在尝试自动单击每个页面,但出现以下错误::
endPage=5
for page in range(1, endPage):
print("Page: ", page)
wait.until(EC.visibility_of_element_located((By.XPATH, "//table[@class='gridview']/tbody/tr[22]/td/table/tbody/tr//td/span//following::td["+str(page)+"]/a"))).click()
错误:
Traceback (most recent call last):
File "./code.py", line 52, in <module>
wait.until(EC.visibility_of_element_located((By.XPATH, "//table[@class='gridview']/tbody/tr[22]/td/table/tbody/tr//td/span//following::td["+str(page)+"]/a"))).click()
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <a href="javascript:__doPostBack('ctl00$C$CtlList','Page$...')">4</a> is not clickable at point (665, 579). Other element would receive the click: <iframe id="ipcc_chat_iframe" src="https://econtact.viettel.vn:8907/?key=P2RvbWFpbj1LSERUX0RWX1RUJnVzZXJuYW1lPSZjb2xvcj1ncmVlbiZpbnRlcm5hbD0wJmNsb3NlX2JveD11bmRlZmluZWQmbW9iaWxlX2FwcD11bmRlZmluZWQ%3D" style="border: 0px; width: 190px; height: 35px; position: fixed; bottom: 20px; right: 25px; z-index: 9999;"></iframe>
(Session info: headless chrome=92.0.4515.131)
我希望你能帮助我