Я пытаюсь соскрести статьи с нескольких страниц из https://edm.com/news, используя Selenium с хром-драйвером, и столкнулся с несколькими ошибками, пытаясь нажать кнопку «Подробнее».Любые идеи о том, что я могу попробовать?
Я пытался работать с ActionChains.move_to_element (..). Click.perform () также пробовал несколько вызовов time.sleep или WebDriverWait.until ... кажется, ничего не делаеттрюк.
start_url = "https://edm.com/news"
browser = webdriver.Chrome(executable_path='chromedriver.exe', options=self.option)
browser.get(self.start_url)
# Wait max 10 secs for page to load
timeout = 10
WebDriverWait(browser, timeout).until(EC.visibility_of_element_located((By.XPATH,'//*[@id="lyra-wrapper"]/div/div[3]/section/'
'div[2]/section[2]/section/div/button')))
time.sleep(2)
button = browser.find_elements(By.XPATH, '//*[@id="lyra-wrapper"]/div/div[3]/section/'
'div[2]/section[2]/section/div/button')[0]
button.click()
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
return self._parent.execute(command, params)
File "C:\Program Files (x86)\Python37-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Program Files (x86)\Python37-32\lib\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 (508, 4270)
(Session info: chrome=74.0.3729.169)
(Driver info: chromedriver=2.42.591088 (7b2b2dca23cca0862f674758c9a3933e685c27d5),platform=Windows NT 10.0.17763 x86_64)```