javascriptselectdrop-down-menudropdowntestcomplete

Select Item in dropdown list using TestComplete


Hi I'm new to TestComplete. And lately, I have trouble recording the action of "selecting the item inside the dropdown list." I've researched the following sites but still failed. Now, my script is like this: Any ideas would be very appreciated! THX!

my trimmed script:

...
Aliases.browser.pageName.select.DropDown();
Aliases.browser.pageName.Find("the item name in the dropdownlist").Click();// error occurs
...

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/finding-objects/common-methods.html#_ga=2.245019525.1439147683.1607408383-284122070.1606206167

https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/android/spinner/drop-down-lists.html

https://community.smartbear.com/t5/TestComplete-Functional-Web/Select-Items-from-dropdown-list-in-different-ways/td-p/153820


Solution

  • Use Aliases.browser.pageProcess.formAspnetform.selectProduct.ClickItem("name of Item "); or try with Page.NativeWebObject.Find method