Forum Discussion
The error happens after navigating to url. In IE, it works fine. Seeing this issue in chrome only, before clicking on link, it fails.
Below is my script -
function Test2()
{
Browsers.Item(btChrome).Run("url");
aqUtils.Delay(10000, "Delaying Test Run");
Aliases.browser.pagePita3.navNavLeft.linkAccountInitialization.Click();
Aliases.browser.pagePita.Wait();
Aliases.browser.BrowserWindow.Close();
}
Shehnaz wrote:
The error happens after navigating to url. In IE, it works fine. Seeing this issue in chrome only, before clicking on link, it fails.
Below is my script -
function Test2()
{
Browsers.Item(btChrome).Run("url");
aqUtils.Delay(10000, "Delaying Test Run");
Aliases.browser.pagePita3.navNavLeft.linkAccountInitialization.Click();
Aliases.browser.pagePita.Wait();
Aliases.browser.BrowserWindow.Close();
}
In the code above, at what point do you get the error?
Also, note that Chrome does, sometimes, take longer to resolve a page after being launched since it does a "check for updates" immediately upon running and that can take a few moments. Additionally, there may be extensions, etc., in chrome that need to start up and check for updates as well. So, you have a 10000 hard coded delay there. That MIGHT not be enough for Chrome on startup. I'd actually do a "Wait" on the page after launching the URL and set the timeout to something like 120000 just to make sure that you have the whole page up. So, modified code:
function Test2()
{
Browsers.Item(btChrome).Run("url");
Aliases.browser.pagePita3.Wait(120000);
Aliases.browser.pagePita3.navNavLeft.linkAccountInitialization.Click();
Aliases.browser.pagePita.Wait();
Aliases.browser.BrowserWindow.Close();
}
- Shehnaz4 years agoOccasional Contributor
Hi Robert,
Thank you for sending modified code. But unfortunately, it didn't work , still getting same error after the page loads and before clicking Account Initialization link.
See attached TC logs.
- tristaanogre4 years agoEsteemed Contributor
Could you give more of the log? From what I'm seeing, there's a navigation line above the error... so... are you SURE it's happening there and not on the BrowserWindow.Close? Double click on the error line should take you to the line of code generating the error.
Also... I suspect that the code you posted here is NOT exactly what is executing. Is it possible for you to post the actual code generating the error?- BenoitB4 years agoCommunity Hero
Please make a try plain script (without aliases)
Related Content
Recent Discussions
- 17 hours agojstaehlin
- 2 days agoAivanitskiy