skip to Main Content

Html – Python selenium: nested element finding

I'm trying to write a function, which returns a list of elements from any level of nesting from the html, containing the word 'products' in its text, case insensitive. here is my function: def __find_elements(driver): return driver.find_elements(By.XPATH, "//*[contains(translate(descendant::text(), " "'ABCDEFGHIJKLMNOPQRSTUVWXYZ',…

VIEW QUESTION

Html – How do I get the value of the aria-label attribute from this WebElement?

Using Java Selenium, I have a reference to a WebElement object that represents the following HTML node: <td role="gridcell" class="mat-calendar-body-cell ng-star-inserted" style="width: 25%; padding-top: 7.14286%; padding-bottom: 7.14286%;" tabindex="-1" data-mat-row="0" data-mat-col="0" aria-label="2001" aria-selected="false">...</td> I need the 2001 value of the aria-label…

VIEW QUESTION
Back To Top
Search