1

I am trying to click through all buttons of a certain type on a webpage and scrape the info from the resulting pop up boxes. The code I wrote so far works on the first 4 buttons and on the next I get the following error message:

ElementNotInteractableException: Message: element not interactable

Here is the code I wrote so far:

driver = webdriver.Chrome()

url = 'https://www.handyverkauf.net/macbook-verkaufen/macbook-pro'
    
time.sleep(3)
driver.get(url)
time.sleep(3)


buttons = driver.find_elements_by_xpath("//a[@class='uk-button uk-button-small uk-button-primary']//span[@class='uk-hidden-small'][contains(text(),'Zum Vergleich')]")

buttons[4].click()

The webpage is this: https://www.handyverkauf.net/macbook-verkaufen/macbook-pro

I have attached a screenshot here which shows the buttons I would like to click. The first 4 'Zum Vergleich' work fine (for the MacBook Pro 2021) but then the fifth (for the Macbook pro 2020) stops working.

5

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.