TestProject Forum

How to get a text with underscore?

Hi, how can I get text Traffic_Management in a parameter. I have used Get Text but it is not picking value.
Thanks

Hi @hafsa
As you can see it is working for me:

Please use the explorer or dev tools and make sure that the character is actually part of the text inside the element.

My text is readonly field.

As you can see,
The get text action can capture underscore,

Please verify that you actually have a character inside the element using dev tools (F12).

Hi, Issue not resolved yet.

This is the GUI

element2

I have tried with Contains Text, now I am getting xpath time out error.



Hi @hafsa
After reviewing your issues it seems that the element is inside 10 shadow-dom root elements.
In order to create a working locator, you will need to use Javascript please follow this guide: