Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97781

Ignore screen reader text in serenity

$
0
0

serenity is returning the screen reader text along with the visible text in the screen. How to get text which is visible to the user?

public static Target TransactionTypeOption = Target.the("Transaction Type options").located(By.xpath("//ipb-dropdown[@class='type-dropdown ']//li//div"));      
List<String> options = Text.of(TransactionTypeOption).viewedBy(actor).asList();

enter image description here

I have used bootstrap Sr-only class for the screen reader text. So, I just wanted to read the first content which is "All Transactions" but serenity is returning me "All Transactions white spaces , current selection"


Viewing all articles
Browse latest Browse all 97781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>