Highlighted
Established Member..
Established Member..
637 views

How to validate a text in 2 locations (alternate location) in truclient protocol.

Jump to solution


I am using Truclient protocol, I need to validate a specific text which is displaying in 2 different locations depending on the data. My test should pass if that text dispalys in any of those 2 locations. How can I write java script code to validate this situation.

 

Thanks

Kumar

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Now it is much clearer. Thanks for the clarification.

I have attached a screenshot that explains how I think you can handle it. Hope it fits into your case.

Let me know if anything is unclear

 

 

View solution in original post

5 Replies
Highlighted
Established Member..
Established Member..

Please let me know if my question is not clear.

Thanks, Kumar

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Hi,

The question is not 100% clear. Can you please clarify it?

Why do you have to write JavaScript code for that? Did you try using Get Property action in Generic Object Action step?

Thanks,

Shlomi

0 Likes
Highlighted
Established Member..
Established Member..

Thank you Shlomi,

I need to verify whether a graph is loaded or not, If graph is loaded then I can validate some text on that window. [for this verify on object text will work], some times there will be no data to produce the graph and it says 'Data is not present', this is also a valid scenario. [bcaz in some cases, user are new and they might have not having any data].

I need to validate a text when graph is present[xpath location is different from 'Data is not present' object] and also in some cases 'Data is not present',

Since both of them are in different places [frames], I am in ambiguity to verify.

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Now it is much clearer. Thanks for the clarification.

I have attached a screenshot that explains how I think you can handle it. Hope it fits into your case.

Let me know if anything is unclear

 

 

View solution in original post

Highlighted
Established Member..
Established Member..

Thank you Shlomi

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.