Home > Net >  How inspect element and find the correct element? I using Python an Selenium in an personal Project
How inspect element and find the correct element? I using Python an Selenium in an personal Project

Time:12-07

I need acess the menu and select an option using find_element_by_css_selector, find_element_by_name or driver.find_elements_by_id("#####").click() but don't work, i think it's because have more than an option to select

Someone to help this poor soul kkk Help!

Here an example and below the code [1]: enter image description here

Bear in mind that a lot of times it's better to use the WebDriverWait class to click on a element. Like:

from selenium.webdriver.support.wait import WebDriverWait

elem = WebDriverWait(driver, 30).until(
    EC.element_to_be_clickable((By.ID,'Cotacoes')))
elem.click()

Lemme know if you have any question about it!

  • Related