skip to Main Content

Css – Finding nested element using Xpath in Selenium not working

given the following site and locators: https://ultimateqa.com/automation XPATH CONTAINER = (By.XPATH, '//ul[@class="bottom-nav"]') MENU = (By.XPATH, '//li[contains(@class, "menu-item")]') CSS BOTTOM_NAV = (By.CSS_SELECTOR, '.bottom-nav') MENU_ITEM = (By.CSS_SELECTOR, '.menu-item') I need to find inside the BOTTOM_NAV the number of MENU_ITEMS. When using nested…

VIEW QUESTION

Html – How to find link using selenium when "linktext" is a div?

<a href="/r/androidapps/comments/13olal1/what_happens_to_photos_resized_in_samsung_builtin/"> <div class="_1AKeAGcglmBjK1SUUXNFti _1-SZ3VwLjbFwTzaZvU8FBX _1FT0e6kh1BBb_oALAMW_l7 _1yBpz1MEPxxYTxjlEilGtB" data-testid="post-title" style="--posttitletextcolor:#222222"> <h3 class="_eYtD2XCVieq6emjKBH3m">what happens to photos resized in Samsung built-in gallery app</h3> </div> </a> I want "/r/androidapps/comments/13olal1/what_happens_to_photos_resized_in_samsung_builtin/" in the "a" tag. How do I use selenium to get the url as a…

VIEW QUESTION
Back To Top
Search