Forum Discussion

hendrik_schreib's avatar
hendrik_schreib
Occasional Contributor
14 years ago

The setItem function does not work with drop down list

Hi,



i use TestComplete 8.10 and Internet Explorer 8. I try to record a keyword test which fills a web form with a select element (drop down list / combo box). The recorded keyword test does not select the recorded item during test execution. If i change the setItem to selectedItem('index'), the correct item will be selected. But i need the select by name function "setItem". How can i use the function or is there any alternative?



Thanks

6 Replies

  • hendrik_schreib's avatar
    hendrik_schreib
    Occasional Contributor
    I use the selectedIndex function. But i need the clickItem function (select by name).



    Any helpful suggestions ?



    Thanks
  • scsvel's avatar
    scsvel
    Frequent Contributor
    I am not sure but you can try with property SelectedItem("ItemName") instead of SelectedItem(index).
  • Hello Hendrik,



    Use ClickItem to select a particular item by its caption. The ClickItem action accepts both indexes and captions. Does this help?
  • hendrik_schreib's avatar
    hendrik_schreib
    Occasional Contributor
    Hi Allen,



    the ClickItem function does not work. During execution the selected entry is not changed. Additionally there are no errors or exceptions.



    Any proposal is welcome!



    Thanks









  • Hello Hendrik,





    Please send us your project along with the log files so that we can see what is going on. To make sure you've included all the necessary files, please zip the entire project suite folder. Also, save a local copy of the problematic page and try to reproduce the problem with it. Check whether the problem is reproduced, let us know the results and send us the saved page.