Forum Discussion

samuel_1's avatar
samuel_1
Occasional Contributor
14 years ago

Unable to use some SelectBox in Chrome17

Hi,


I use this line


pageDeposit.selectPaymentMethod.ClickItem(1);


it works fine in IE9, FF


but choose the wrong value in chrome


why??

10 Replies

  • Hi Samuel,



    First of all, I'd try working around the issue by passing the needed item's caption as the parameter of the ClickItem method.



    As for the cause of the difference, I cannot say anything about it, because I didn't manage to find a way to reproduce it. I used this sample during my experiments. Can you reproduce the difference on this sample? Also, is your code line a part of a recorded test?
  • samuel_1's avatar
    samuel_1
    Occasional Contributor

    Hi,


    Can you check it on this on chrome 17 ?



    <html>

    <body>



    <select id="Cars">

    <option>Volvo</option>

    <option>Saab</option>

    <option>Mercedes</option>

    <option>Audi</option>

    </select>



    <select id="Languages" name="Languages"><option selected="selected" value="en">English</option>

    <option value="ar">العربية (Arabic)</option>

    <option value="fr">Fran&#231;ais (French)</option>

    <option value="ru">русский (Russian)</option>

    <option value="es">Espa&#241;ol (Spanish)</option>

    <option value="zh">中文 (Chinese)</option>

    <option value="ro">Rom&#226;nă (Romanian)</option>

    <option value="hu">Magyar (Hungarian)</option>

    <option value="el">ελληνικά (Greek)</option>

    <option value="nl">Nederland (Dutch)</option>

    <option value="de">Deutsch (German)</option>

    <option value="it">Italiano (Italian)</option>

    <option value="tr">T&#252;rk&#231;e (Turkish)</option>

    <option value="pt">Portugu&#234;s (Portuguese)</option>

    <option value="ja">日本 (Japanese)</option>

    </select>



    </body>

    </html>

  • Hi Samuel,



    I've got the same result using your page - no issues. Which item does your code line select? It should be the second one as the index is zero-based. Also, could you please record a video demonstrating the problem and post it here orsend it to us? For example, you can use Jing, which is a free recorder.
  • samuel_1's avatar
    samuel_1
    Occasional Contributor

    ok


    i use chrome 18.0.1025.162 m


    i use this line


    Aliases.iexplore.login.panelHeader.selectLanguages.ClickItem(3);//french



    but it always choses item  8 (hungarian) 



    atached swf flash file

  • Hi Samuel,



    Thank you for providing me with steps to reproduce the issue. We've reproduced it in our lab. We'll analyze it and post the results here.
  • Hi Samuel,



    We'll work to fix the issue in the future version of TestComplete. As for now, try setting two property values for the combo box object before clicking the needed item:



    ...

      select.style.setProperty("background-color", "white", null);

      select.style.setProperty("color", "black", null);

      select.ClickItem("Français (French)");

    ...

  • samuel_1's avatar
    samuel_1
    Occasional Contributor

    got an error: Unable to find the object setProperty("background-color", "white", null). See Additional Information for details.


    what to do? 


  • Hello Samuel,



    TestComplete 9 that includes the fix for the issue was released. Update to that version and check whether the problem persists.