Forum Discussion

phil_hunter's avatar
phil_hunter
Occasional Contributor
11 years ago

TestComplete is selecting the wrong list item

Hi, I'm relatively new and I havn't been able to find useful documentation on this, but when I run the automated test, TestComplete selects the wrong list item.  ...
  • jose_pita's avatar
    11 years ago
    Create a new script routine, with "object spy" see the properties of the object you want to click, after that just adapt the code I'm giving below to your needs:




    //function you can call everywhere


    function clickContentTextVisibleOnScreen(text)


    {


    Aliases.browser.pageIsServicePortal.Find(new Array("contentText", "visibleOnScreen"), new Array(text, "True"), 500, true).Click();


    }


     


    //put you mouse cursor here and click the green "play" button on top of the editor


    function main()


    {


    clickContentTextVisibleOnScreen("I want to order a cellphone");


    }