Friday, March 10, 2023
HomeCSShtml - selenium by_xpath not returning any kind of outcomes

html – selenium by_xpath not returning any kind of outcomes


I am making use of Selenium 4+, as well as I appear to not come back the any kind of outcome when asking for aspects in a div.


# Wait on the web page to lots.
delay = WebDriverWait( vehicle driver, 10).
wait.until( EC.presence _ of_element_located(( By.ID, "search-key"))).

# wait on the web page to lots.
driver.implicitly _ delay( 10 ).

# look for the vendors you intend to message.
search_input = driver.find _ component( By.ID," search-key").
search_input. send_keys(" vendors").
search_input. send_keys( Keys.RETURN).

# locate all the provider shops on the web page.
supplier_stores_div = driver.find _ component( By.CLASS _ NAME, "listing-- gallery-- 34TropR").



print( supplier_stores_div).

supplier_stores = supplier_stores_div. find_elements( By.XPATH, "./ a[@class="v3--container--31q8BOL cards--gallery--2o6yJVt"]").

print( supplier_stores).

The logging declarations offered me << selenium.webdriver.remote.webelement.WebElement (session=" a3be4d8c5620e760177247d5b8158823", component=" 5ae78693-4bae-4826-baa6-bd940fa9a41b")> > as well as []

The html code is right here:

<< div course=" listing-- gallery-- 34TropR" data-spm=" major" data-spm-max-idx=" 24">> flex

<< a course=" v3-- container-- 31q8BOL cards-- gallery-- 2o6yJVt" href="( web link)" target=" _ space" design=" text-align: left;" data-spm-anchor-id=" a2g0o.productlist.main.1"> > (some divs) < flex.

That is simply one << a>> course, there's even more.

RELATED ARTICLES

Most Popular

Recent Comments