TestComplete Tips: Checking if Web Page Contains Specific Text
Test and Monitor | Posted December 08, 2006

When testing web pages you often need to check if a web page contains
specific text before continuing with the next step. You can perform
this check by using TestComplete’s functionality.

To check if the web page contains specific text, you can obtain the page’s source code and search for the desired text in it. The following code demonstrates how you can do this in TestComplete. The sample routine works with the web page that displays the orders list. To view this page, open the <TestComplete>SamplesOpen AppsOrdersDemoWebStart.htm page in your Internet browser and click View all orders. The test script works with Internet Explorer 6. If you use another browser, you will need to modify the script lines responsible for obtaining the Page object and the document object.


By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox