How to confirm if a substring is in a webpage

How to apply eValid to functional testing of web applications.

How to confirm if a substring is in a webpage

Postby ShariN » Wed Dec 20, 2017 11:29 am

Morning.

I was wondering:

If I want to confirm that a substring is present in a part of page, how do I do that?

Thanks
ShariN
 
Posts: 1
Joined: Wed Dec 20, 2017 11:25 am

Re: How to confirm if a substring is in a webpage

Postby eValid » Thu Dec 21, 2017 8:21 am

ShariN wrote:Morning.

I was wondering:

If I want to confirm that a substring is present in a part of page, how do I do that?

Thanks


That's a fair question ShariN.

The Validate Selected Text command, which you run from an eValid pull-down after highlighting a part of a string, is what you need.

Note that when eValid at playback time is validating the string, it does so by searching for a match of a substring starting at a specified offset.

So the string you want has to be in the correct place.

If you want to find whether a substring exists in an element, then you are better off using the MatchString command.

The syntax is:

MatchString wid "text" key ["frame_path"]

where you specify the window and any frame_path details, and use the key to signify if you want the match to be case insensitive (0) or case sensitive (1).

You get a PASS on this command if the specified text is present ANYWHERE in the current page.

Hope that helps answer your question, if you need more in-depth help, please contact us.


-- eValid Support
eValid
 
Posts: 1802
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons