Need help to extract the visible text in a Web Page

23 views Asked by At

I'm new to WebDriverIO.

I'm now dealing with an issue in which a locator contains the CSS property.

text-overflow: ellipsis;

This allows the text in the locator to fit inside the width.

As an example: "Long live the king" is written on the locator.

The text will be displayed as "Long live t..." after using CSS text-flow.

My concern is, utilising webdriverIO typescript, is there any way to ensure that the option does not contain three dots? Using the CSS text-overflow property

or is there another way to deal with this?

FYI: This work is about a dropdown and a list on text init, and I need to test that the whole text is displayed or multiple dots are displayed.

I'm totally new to this I just took an refrence from How do I get just the visible text with jQuery (or Javascript)?

0

There are 0 answers