AMR013
2 years agoContributor
TestComplete not recognizing page even though same line previously worked
Hi everyone,
In my test I'm doing a simple line to input text into a textbox (Specifically, username in a username textbox). After doing what I need to do in my application, I log out (which takes me back to the login screen) and need to log in as a different user to do another test in the application. For some reason, TestComplete is not recognizing that same line for the username after I log out. Specifically, it says the page was not found even though it's the same URL I previously used. Any ideas as to why TestComplete can't find the page even though I've clearly used it before? Below is an example of my code:
// Declaring page
var page = 'https://www.testPage.com';
// Launch Google Chrome and access page.
Browsers.Item(btChrome).RunOptions = page;
Browsers.Item(btChrome).Run();
// Click Username textbox
Aliases.browser.Page(page).FindElement("#username").SetText("user1");
/* Do test and then log out */
// Click Username textbox
Aliases.browser.Page(page).FindElement("#username").SetText("user1"); -> This same line results in the page not found error.