Skip to content
Advertisement

Selenium problem with ElementClickInterceptedException

I am trying to scraping in this URL, dealing with a Download button and I am having a problem, as the last line gives a ElementClickInterceptedException.
My actual goal is to download the CSV file.

The code:

JavaScript

enter image description here

Advertisement

Answer

  1. Element you trying to click in initially out of the visible viewpoint. So, you need first to scroll the page and only then to click on that element.
  2. By clicking the first element new tab is opened and the second element you want to click is there, on the second tab. So, you need to switch to the new tab to access that element.
  3. No need to define wait = WebDriverWait(driver, 10) second time.
    The following code is working:
JavaScript

It does not download the file, only opens the downloading dialog enter image description here

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement