I am trying to grab the text $1.00 from the following HTML code (I have the xpath, so don't worry about that). For this purpose, we can say the xpath is //\*[@id="price-string"]

```
<strong id="price-string">$1.00</strong>

```

I have tried using driver.findElement(By.xpath("//\*[@id="price-string"]")) followed by .gettext(), .getAttribute("textContent"), .getAttribute("innerHTML");

All of them return null, which means they could not find it.

I saw this post here on stackexchange: <https://sqa.stackexchange.com/questions/30627/how-to-get-text-under-strong-tag-in-selenium-webdriver-using-java> that might help. They say problem is, you cannot directly target/find text nodes with Selenium WebDriver, only regular element nodes. How would you be able to implement a fix in java? Thanks!