Forum Discussion

stephen_madden's avatar
stephen_madden
Occasional Contributor
4 years ago
Solved

Warning in log after test ru

I have not used TestComplete in a long time, so I am refreshing myself. I put together a project with two JavaScript Units. One file contains two functions that are run along with the other file, that contains one function that is run. Now, if I run the project (all three functions), I get a warning in the log (no error):

The action may be performed incorrectly, because the control is not visible. 16:53:59 Normal 0.60

But, if I put focus on just that one function that has the warning, and run it, it completes without a warning, every time. For fun, I put a "WaitChild" in to see if it made a difference. No:

var sg = require("SearchGoogle");
var txtUName = Aliases.edgeBrowser.pageYahoo2.formLoginUsernameForm.txtUserName;
var txtPass = Aliases.edgeBrowser.pageYahoo2.form.passwordField;
var btnPasswordNext = Aliases.edgeBrowser.pageYahoo2.form.buttonNext;
var yahooPage = Aliases.edgeBrowser.pageYahoo;

function badLogin(){
sg.openAndNav("http://www.yahoo.com");
login("stephen.madden@rocketmail.com", "badpassword");
aqObject.CheckProperty
(Aliases.edgeBrowser.pageYahoo2.form.textnode, "contentText", cmpEqual, "Invalid password. Please try again");
sg.closeBrowser();
}

function successfulLogin(){
sg.openAndNav("http://www.yahoo.com");
login("stephen.madden@rocketmail.com", "fksdjfslkfk!");
aqObject.CheckProperty(Aliases.edgeBrowser.pageYahoo3.header.textnode, "contentText", cmpEqual, "Steve");
Aliases.edgeBrowser.pageYahoo3.header.userPic.HoverMouse();
Aliases.edgeBrowser.pageYahoo3.header.WaitChild("linkLogOut");
Aliases.edgeBrowser.pageYahoo3.header.linkLogOut.Click(); //here is where the warning occurs
yahooPage.Wait();
sg.closeBrowser();
}

function login(userName, pass){
var signIn = Aliases.edgeBrowser.pageYahoo.header.panelYbarInnerWrap.panel.panel.panel.panel.link;
var staySignedInLink = Aliases.edgeBrowser.pageYahoo2.formLoginUsernameForm.staySignedIn;
var btnNext = Aliases.edgeBrowser.pageYahoo2.formLoginUsernameForm.submitbuttonNext;

signIn.Click();
staySignedInLink.Click();
txtUName.SetText(userName);
btnNext.Click();
txtPass.SetText(pass);
btnPasswordNext.Click();
}

 

Anyone have a similar issue in the past?

  • On which line does the test produce the warning? We have found that web tests can be a bit weird if you try to go too fast, as a test try putting delays around the operations that produce the warnings.

     

    For our web apps we have had to make them more robust by waiting for elements to be visible before we interact with them, but that depends on what's being tested.

2 Replies

  • tphillips's avatar
    tphillips
    Frequent Contributor

    On which line does the test produce the warning? We have found that web tests can be a bit weird if you try to go too fast, as a test try putting delays around the operations that produce the warnings.

     

    For our web apps we have had to make them more robust by waiting for elements to be visible before we interact with them, but that depends on what's being tested.