Forum Discussion

chicks's avatar
chicks
Regular Contributor
14 years ago

click on link in sliding panel "misses"

I am attempting to test a login panel that appears on the webpage when you click the login button.  The panel slides open.

I can find the close link, but when I click on it with the script, the panel does not close.  When I click on it manually, the panel closes with no problem.



I notice that after the script completes but the panel does not close that the cursor is not centered on the close link, but instead it appears a little bit "off" to the right, and below it.  I have tried adding a HoverMouse, but this makes no difference in the observed behavior.



Here's my code.  Note that I am opening the webpage and panel manually.  I believe this eliminates any possibility of a timing error.



 function closeButton() {

  currPage =   Sys.Process("iexplore", iexploreNum).Page("*");

  currPage.Wait();

  var loginPanel = currPage.findChild(new Array("ObjectType","name"),new Array("Panel","*toppanel*"),9999);

  verifyLinkExists(loginPanel,"Close");

  var closeButton = loginPanel.findChild(new Array("ObjectType", "innerText"), new Array("Link", "Close"), 9999);

  Log.Message(closeButton.Height);

  Log.Message(closeButton.Width);

  Log.Message(closeButton.ScreenLeft);

  Log.Message(closeButton.ScreenTop);

  closeButton.HoverMouse();

  closeButton.Click();   

}



function verifyLinkExists(aLocation, aLinkText) {

  var link = aLocation.findChild(new Array("ObjectType","InnerText"),new Array("Link",aLinkText),9999);

  if ( !link.Exists ) {

    Log.Error("Link "+aLinkText+" was not found.");

  }

  else {

    Log.Checkpoint("Link " + aLinkText + " found.")

  }

}



I've attached two pictures of a closed and open login panel.  I invoke closeButton() method with the panel open.



Thanks very much for any advice or suggestions.



Regards,  Curt Hicks
  • chicks's avatar
    chicks
    Regular Contributor
    I've changed this to a support request.  I'll update with information as I get it.
  • chicks's avatar
    chicks
    Regular Contributor


    Vince helped me out with a patch for this.  Note that I am using version 8.50.626.7  of TestComplete.

    I don't know if his patch is applicable to all versions.



    Regards,  Curt Hicks



    ======================


    Hi Vince,


    This seems to be working consistently.  Thank you very much for your help!


    Regards,


    Curt


    -----Original Message-----


    From: AutomatedQA Support [mailto:Support@AutomatedQA.com]


    Sent: Tuesday, October 11, 2011 4:48 AM


    To: Curt Hicks


    Subject: RE: [Issue# M0090700] Web Submission - click on
    link in sliding panel "misses"


    Hi Curt,


    We have prepared a patch for the problem:


    http://downloads.smartbear.com/support/530ebd9b-3ef5-4db9-9c11-f0a5fd28f07b


    Extract tcIEHook.dll from the archive to <TestComplete
    8>\Bin\Extensions replacing the existing file.


    Let us know whether the patch helps.


    Best regards,


    Vince


  • Hi Curt,





    We have tested the patch with TestComplete 8.60.665 - it works fine as well.





    Also, note that the patch link expires 24 hours after the download occurred. That is why it is necessary to contact Support directly to generate a new link.