Testcomplete do not recognize the text on web page and browser title
We are trying to verify the browsertitle and message on the web page but Testcomplete do not recognize it . Attach the screenshot.
We are using
Sys.Browser("*").Page("*").contentDocument.body; For the text on the web page but it return empty string
We are using for browser title
Sys.Browser("*").Page("*").contentDocument.title but it returns empty string.
You're wildcarding an AWFUL lot in your identification of the page. If you have any other browser open to any other page in your system, you will run into a problem with unique identification. What happens when you replace the wildcards with the actual browser name and page URL that you're attempting to access? Does it work better for you then?
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
In addition to Robert's reply: any real reason to use contentDocument property but not the properties provided by TestComplete?
Also, can you provide a code snippet (along with the navigation to the page) that returns empty values?
/Alex [Community Hero]
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
I am killing all the browser process before the script invoke the application.
Yes Testcomplete do not recognize the object that is why we cannot use the properties. One thing I noted
Under the Web testing when I check the option "Use XPath and CSS selectors for web objects(required for cross-platform web tests) then do the object spy then object spy highligh the text as attached in the screenshot.