skip to Main Content

Selenium cannot find element in source HTML

Given: Python 3.11.2 Selenium 4.8.2 Chrome as the browser engine I am looking to find the following inside HTML: <input type="text" class="datepicker apex-item-text apex-item-datepicker hasDatepicker" size="32" value="15-MAR-2023"> I tried this: browser.find_element(By.CLASS_NAME, 'datepicker apex-item-text apex-item-datepicker hasDatepicker') and browser.find_element(By.CSS_SELECTOR, 'input[type="text"][class="datepicker apex-item-text apex-item-datepicker…

VIEW QUESTION

Get text from a span element – Woocommerce

It is a dynamic span. I want to get the number that keeps changing. In this case it would be 436 Code trials: valorliquido = navegador.find_element_by_css_selector("span[class="woocommerce-summary__item-value"]") Got: valorliquido = navegador.find_element_by_css_selector("span[class="woocommerce-summary__item-value"]") ^ SyntaxError: invalid syntax Snapshot of the HTML:

VIEW QUESTION

Not getting the data from web page with Selenium (Python) – Html

I'm trying to get a table from a dynamic webpage using selenium but it's giving me issues. This is the Python code: from selenium import webdriver url = 'https://draft.shgn.com/nfc/public/dp/788/grid' driver = webdriver.Chrome('C:chromedriver_win32chromedriver.exe') global_dynamicUrl = "https://draft.shgn.com/nfc/public/dp/788/grid" driver.get(global_dynamicUrl) table_area = driver.find_element("xpath", '//*[@id="result"]/table')…

VIEW QUESTION
Back To Top
Search