Forum Discussion

thoffmann's avatar
thoffmann
New Contributor
7 years ago

Issue with Chrome and ClickItem

Hello,

 

i have a problem with a select combo box and the method ClickItem() in Chrome.

 

Here is an example (converted from keyword test to script):

function SelectFromDropDown_Chrome()
{
//Opens the specified URL in a running instance of the specified browser.
Browsers.Item(btChrome).Navigate("https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select");
//Selects the 'Audi' item of the 'select' combo box.
Aliases.browser.pageWwwW3schoolsComTagsTryitAspF.frameIframeresult.select.ClickItem("Audi");
//Checks whether the 'wText' property of the Aliases.browser.pageWwwW3schoolsComTagsTryitAspF.frameIframeresult.select object equals 'Audi'.
aqObject.CheckProperty(Aliases.browser.pageWwwW3schoolsComTagsTryitAspF.frameIframeresult.select, "wText", cmpEqual, "Audi");
}

At the end Chrome select "Opel" and not the given text "Audi".

 

This strange behavior only exists in Chrome. In the others browsers (Firefox, Internet Explorer, Edge) the keyword test or script works.

 

Can anyone help me with this problem?

 

Regards

Thomas

8 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    That is odd.  I just tried it myself... and it works fine... which tells me that there's something specific with your environment.

     

    Let's start first with the version of TC and version of Chrome to make sure that one supports the other.

    • thoffmann's avatar
      thoffmann
      New Contributor

      Hello,

       

      thanks for the fast reply.

       

      I used the Chrome version:

      Version 61.0.3163.79 (Official Build) (64-bit)
       
      and the TestComplete version:
      12.31.1833.7 (Trial Version)
       
      and Windows version:
      Microsoft Windows 10 Enterprise, 64 bit (10.0 Build 10586)
       
      I hope you can help me so fix the problem.
       
      Regards,
      Thomas
      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I have pretty much the same setup on my end... and I'm still not seeing the problem.  In watching it run, I see that, when the click item is initially fired, the text does say Opel... but then once the ClickItem completes, Audi is selected and the checkpoint passes.

         

        What seems to be the problem is, potentially a timing issue of sorts with the Chrome browser.  I don't know for certain.  Make sure that you have your Chrome browser set up with all the recommended settings under https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome.html.  I'd pay special attention to the commentary about disabling other extensions and making sure that "Auto-fill" is turned off.

  • xuanphuoc2411's avatar
    xuanphuoc2411
    Occasional Contributor

    In my cases, TestComplete seems only click on central of popup to close popup instead of clicking on coordinate of item :( However, it only happens on one of  8 our PCs. Could you have any solution to fix this issue :(

     

    TestComplete version: 12.41.2879.7

    Google chrome version 62.0.3202.89

    OS: Windows 10 64bit

    • kevin_kapell's avatar
      kevin_kapell
      Frequent Contributor

      I had put in s support ticket on this and they responded with a patch they had for their 40.xxx version of code that I applied to the 41.xxx code which fixed this problem. Your one machine that it is working on may be on the 40.xxx code.


       

      • xuanphuoc2411's avatar
        xuanphuoc2411
        Occasional Contributor

        Could you send me the patch? We installed version 12.41 but don't know why this issue happened. We did not face with it before.