1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Element cant be found in any ways inside Menu

Discussão em 'Python' iniciado por Stack, Setembro 16, 2025.

  1. Stack

    Stack Membro Participativo

    Im trying to do QA Autotest on Google page menu in the top right corner. Učet = Account button.

    [​IMG]

    When I try to do

    elements = self.driver.find_elements(By.CLASS_NAME, "j1ei8c")

    elements[0].click()


    It acts as it doesnt see that Class Name at all. It says List index out of range.

    When I try to do dumb way by Xpath

    element = self.driver.find_element(By.XPATH, '/html/body/div/c-wiz/div/div/c-wiz/div/div/div/div[2]/div[1]/ul/li[1]')

    element.click()


    It says no such element and unable to locate.

    Beforehand I command in python to click and open that Menu by command

    elements = self.driver.find_elements(By.CLASS_NAME, "gb_B")

    elements[0].click()


    It opens without problem and stays open I did time.sleep() just to try if it was the case but it didnt help.

    Continue reading...

Compartilhe esta Página