Forum Discussion
We have now started building Chrome tests.
We already have firefox tests. For chrome tests we are just copying the scripts and Name mapping . We make changes in script where we are launching browser just replacing firefox with chrome .
Is it the right way to do this ? Do we need to create name mapping again for chrome browser ?
Please update
Thanks
NG
Hi,
> we are just copying the scripts and Name mapping .
In general, copying is not required and only browser name should be provided as a parameter.
However, depending on your tested web application and test code, script adjustments might be required to match browser specific.
- Marsha_R4 years agoChampion Level 3
The error messages are usually pretty targeted. What ever that line is looking for didn't happen fast enough for the test to see it.
You can test this by putting a Delay right before the line that failed. If that seems to fix it, then take the Delay out and adjust the failed line with the appropriate Wait
- AlexKaras4 years agoChampion Level 3
Hi,
> It appear randomly.
I have a guess that the error appears when the test is started when the tested site is opened in the browser. Can you confirm this? (Or, maybe, the opposite - the error appears when the test is started when the tested site is not opened in the browser.)
Scenario that I am guessing:
> var titlepage = Aliases.browser...
> ...
> BrowserConfig.killBrowserProcess(...)
> ...
> titlePage.WaitProperty(...);
As it is documented, Aliases uses late binding, resolves referenced object at first use and tries to cache it.
I think that titlePage variable keeps the reference been set initially and this reference becomes invalid when the browser is closed and reopened. Obviously, when test code tries to wait for the Visible property to become true for the empty object, this never happens.
My suggestion will be to:
a) Comment out the .RefreshMappingInfo() line;
b) move the var titlepage = Aliases... line of code to follow the LoginCredentials.basicAuthenticationKeyword(...) line.
Does this help?
P.S. BTW, JScript is a case-sensitive language, but you have titlepage and titlePage variables in your test code. Is this really so?
- Marsha_R4 years agoChampion Level 3
One thing from our side, if you don't give us all the details up front, then we have to keep guessing and you keep telling us no that can't be it. It works better for everyone if you give us lots of details first and then we can give a better answer. Thanks!
- Marsha_R4 years agoChampion Level 3
If what AlexKaras and I have suggested is not working for you, then contact Support directly with your question. Here's their link:
https://support.smartbear.com/testcomplete/message/
- AlexKaras4 years agoChampion Level 3
Hi,
Any more details?
What operation failed? Anything in the Details log pane? Can you post screenshot of the test? Why 'error' message was manually logged just before?
- nisgupta4 years agoValued Contributor
Attached the Detail Panel
javaScript runtime error.
The Operation returned because the timeout period expired.
- Marsha_R4 years agoChampion Level 3
So the error comes where you are waiting on Visible?
I would still put a really long Delay in front of that, just for testing purposes. I'd go up to a full minute. It's difficult to see what's happening some times unless you really slow things down.
Related Content
Recent Discussions
- 12 hours agojstaehlin
- 2 days agoAivanitskiy