1

I have an element that looks like this:

<td style="font-weight: bold; text-align:right;"></td>

Is there anyway to change or detect the blank value between the tags in selenium python?

P/S: This is just an example. There are many elements like this in the data I'm working with.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

As per the HTML:

<td style="font-weight: bold; text-align:right;"></td>

the <td> element doesn't have any text or innerText and in that case you can identify the <td> element as using the following xpath:

driver.findElements(By.xpath("//td[not(text())]"));

However, you have to take help of additional attributes so the locator strategy identify the element uniquely within the HTML DOM.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352