getText returns null ('')

Hi All,

getText is not working in my case… do any of you facing this issue or have solution…!

Edit Page:

Saved Page:

Test1
\[\]

I am using XPath //div[@class=‘tree_content type’]

ActivityType = WebUI.getText(findTestObject(‘Object Repository/Activity/Type_FirstActivity’))

But it is returning : Text of object ‘Object Repository/Activity/Type_FirstActivity’ is: ‘’

Could you please suggest how do I extract the text “Test1” from Saved Page.

Hello,

maybe you may need to add some wait before getText() from saved page. This div on Edit page has really no text, it appears after page is saved and refreshed.

Marek Melocik said:

Hello,

maybe you may need to add some wait before getText() from saved page. This div on Edit page has really no text, it appears after page is saved and refreshed.

I am doing getText after saving/submitting. There are other fields where I can do getText successfully. Here, Edit Page sample was shared to understand how the field value is set and getText is not working. (returns ‘’).

Tried by adding wait before getText(), but no luck.

This is not a blocker for as the parent div attribute is giving the same what I required.