Forum Discussion

ashutosh01's avatar
ashutosh01
Contributor
2 years ago

Not selecting right dropdown

I have a script for selecting value in dropdown, the value to be selected is fetching from an excel.

but it always selects the wrong value from dropdown.

I also recorded it and when replayed it again it selected wrong value from dropdown.

why testcomplete is behaving this way in both scenarios?

piece of code is below

Browsers.Item(btChrome).Navigate(url);
let browser = Aliases.browser;
browser.BrowserWindow.Maximize();
let page = browser.pageDsrSupportTool;
page.checkboxConfigitemcheckbox11.ClickChecked(true);
page.selectInputvalue11.ClickItem("DOW");// here instead of DOW it always select other value 
page.buttonOk.ClickButton();

  • What other value does it select? Where is that one in the drop down?

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    What version of TC you are using? .ClickItem() method had problems in several recent versions of TC. This was mentioned as corrected for TC 15.53, though several users reported that the method still works not perfectly in their cases.

     

    • ashutosh01's avatar
      ashutosh01
      Contributor

      I am using TC Version: 15.51.4.7 , so let me check by updating TC if it solves the issue of ClickItem() method

    • ashutosh01's avatar
      ashutosh01
      Contributor

      I have already tried other method such as actual code is that i am fething the value from excel for ClickItem. It is behaving same way in both cases hard coded and from excel as well.

      I was using 15.51 TC I upgraded it to latest but still same issue.

      So now as you suggested I will try to run in previous version of chrome as I am also running on 115.
      if you could suggest which chrome shall i use? 

      would be great