My program needs to find a series of Spans that their text starts with IMG. The table will potentially have multiple spans that meet this criteria. Example Formatting being:
<td>
<span> IMG Sales Report </span>
</td>
I have tried several different lines of code, but i always end up with results being zero. Heres my latest attempt.
List<WebElement> files = driver.findElements(By.xpath("//span[starts-with(text(), 'IMG')]"));
Any help would be greatly appreciated, cause I cant find a solution that works.