sjordan
12 years agoOccasional Contributor
Web ComboBox - Can't find it?
I recorded a test of our website that involves a drop down box, from which I selected the state "Michigan." When I ran the test, I repeatedly receive an error, "Cannot perform the ClickItem operation." Additional information is as follows:
Aliases.browser.pageCollectorCarInsuranceGetAQuo.panelUnderbody.form
Aspnetform.panelPagecontainer.panelPagebody.panelCtl00Bodycontent.panel
Ctl00CphbodycontentPagearea.panelCtl00CphbodycontentCtl00Pag.panel
Newboxcontainer.panelNewboxbody2.panelInputpagearea.panelCtl00Cph
bodycontentCtl00Bod.panelCtl00CphbodycontentCtl00Gro.panelCtl00Cph
bodycontentCtl00Ctl2.panelCtl00CphbodycontentCtl00Ctl.panelAblueboxcontainer.
panelAblueboxbody2.panelCtl00CphbodycontentCtl00Ctl.panelCtl00Cph
bodycontentCtl00Ctl.panelCtl00CphbodycontentCtl00Ctl.panelCtl00Cph
bodycontentCtl00Ctl.selectCtl00CphbodycontentCtl00Ct
(Sys.Browser("iexplore").Page("http://mo.hagerty.com/qte/quoteinput.aspx?
h=1&stateregion=").Panel("underbody").Form("aspnetForm").Panel
("pagecontainer").Panel("pagebody").Panel("ctl00_bodycontent").Panel
("ctl00_cphBodyContent_PageAreaContent").Panel
("ctl00_cphBodyContent_ctl00_PageAreaBox").Panel(0).Panel(1).Panel
("inputpagearea").Panel("ctl00_cphBodyContent_ctl00_BodyPanel").Panel
("ctl00_cphBodyContent_ctl00_GroupList").Panel
("ctl00_cphBodyContent_ctl00_ctl05_pnlTemp").Panel
("ctl00_cphBodyContent_ctl00_ctl05_pnlSpacer").Panel(0).Panel(1).Panel
("ctl00_cphBodyContent_ctl00_ctl05_pnlBorder").Panel
("ctl00_cphBodyContent_ctl00_ctl05_State").Panel
("ctl00_cphBodyContent_ctl00_ctl05_ctl02_pnlField").Panel
("ctl00_cphBodyContent_ctl00_ctl05_ctl02_pnlFieldContainer").Select
("ctl00_cphBodyContent_ctl00_ctl05_ctl02_StateRegion"))
When I ask it to "Highlight on screen" it has no problems finding my dropdown box, and it has a value "Michigan." I don't understand how to make it recognize and correctly utilize the combo box.
I am a QA analyst, not a programmer, and all the FAQ articles I could find either had code solutions or were specific to a desktop application. Can you please give me a TestComplete UI solution? This is the first time I've picked up TestComplete and the very first test I tried to run, though I have watched all the tutorial videos and a few of the techniques videos. Thanks!
Aliases.browser.pageCollectorCarInsuranceGetAQuo.panelUnderbody.form
Aspnetform.panelPagecontainer.panelPagebody.panelCtl00Bodycontent.panel
Ctl00CphbodycontentPagearea.panelCtl00CphbodycontentCtl00Pag.panel
Newboxcontainer.panelNewboxbody2.panelInputpagearea.panelCtl00Cph
bodycontentCtl00Bod.panelCtl00CphbodycontentCtl00Gro.panelCtl00Cph
bodycontentCtl00Ctl2.panelCtl00CphbodycontentCtl00Ctl.panelAblueboxcontainer.
panelAblueboxbody2.panelCtl00CphbodycontentCtl00Ctl.panelCtl00Cph
bodycontentCtl00Ctl.panelCtl00CphbodycontentCtl00Ctl.panelCtl00Cph
bodycontentCtl00Ctl.selectCtl00CphbodycontentCtl00Ct
(Sys.Browser("iexplore").Page("http://mo.hagerty.com/qte/quoteinput.aspx?
h=1&stateregion=").Panel("underbody").Form("aspnetForm").Panel
("pagecontainer").Panel("pagebody").Panel("ctl00_bodycontent").Panel
("ctl00_cphBodyContent_PageAreaContent").Panel
("ctl00_cphBodyContent_ctl00_PageAreaBox").Panel(0).Panel(1).Panel
("inputpagearea").Panel("ctl00_cphBodyContent_ctl00_BodyPanel").Panel
("ctl00_cphBodyContent_ctl00_GroupList").Panel
("ctl00_cphBodyContent_ctl00_ctl05_pnlTemp").Panel
("ctl00_cphBodyContent_ctl00_ctl05_pnlSpacer").Panel(0).Panel(1).Panel
("ctl00_cphBodyContent_ctl00_ctl05_pnlBorder").Panel
("ctl00_cphBodyContent_ctl00_ctl05_State").Panel
("ctl00_cphBodyContent_ctl00_ctl05_ctl02_pnlField").Panel
("ctl00_cphBodyContent_ctl00_ctl05_ctl02_pnlFieldContainer").Select
("ctl00_cphBodyContent_ctl00_ctl05_ctl02_StateRegion"))
When I ask it to "Highlight on screen" it has no problems finding my dropdown box, and it has a value "Michigan." I don't understand how to make it recognize and correctly utilize the combo box.
I am a QA analyst, not a programmer, and all the FAQ articles I could find either had code solutions or were specific to a desktop application. Can you please give me a TestComplete UI solution? This is the first time I've picked up TestComplete and the very first test I tried to run, though I have watched all the tutorial videos and a few of the techniques videos. Thanks!
- Hi Sabrina,
First of all "Happy New Year"... :)
It is always a best practive to map an object and then use it in the test.
The problem here is , when you recorded the test the properties of the object were different than when you executed next time.(May be index or some other property changes everytime when you launches the website.)
Also the best way to work with web based application is not to use Name-mapping file (when you know the properties of the object changes everytime).
Please have a look at findChild and XPath methods to work without Name mapping files.
I hope this has been of some help.