[Python] trying to use XPATH to click this button, but getting nosuchattributeerror (Instagram)

Discussão em 'Python' iniciado por Stack, Abril 6, 2025.

  1. Stack

    Stack Membro Participativo

    [​IMG]this is the code I'm trying to execute:

    search = driver.find_element(By.XPATH, '//*[@id="mount_0_0_SH"]/div/div/div[2]/div/div/div[1]/div[1]/div[2]/div/div/div/div/div[2]/div[2]/span/div/a')


    And I'm getting nosuchattributeerror. I've tried time.sleep() and WebDriverWait(driver,20) etc.

    I want to click the little magnifying glass on the left (search button).

    Continue reading...

Compartilhe esta Página