This is a migrated thread and some comments may be shown as answers.

Find element by expression does not works

7 Answers 223 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Olesya
Top achievements
Rank 1
Olesya asked on 15 Nov 2010, 12:22 PM
Hello,

I wrote my test and successfully run it in previous version of QA Edition tool.
But when I installed new version (2010.3 1109) and run my test I got the following error:

Selecting item in combo-box'.
InnerException:
System.Exception: Refresh() failed due to an unexpected exception. ---> ArtOfTest.WebAii.Exceptions.FindException: Find Details:
- No FindParams defined.
- Start Element: [Element: 'div:46' (id=GroupSelector_comboGroup)]


   at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
   --- End of inner exception stack trace ---
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh()
   at ArtOfTest.WebAii.ObjectModel.Element.Refresh(Boolean forceDomTreeRefresh)
   at ArtOfTest.WebAii.Controls.Control.Refresh()
   at Telerik.WebAii.Controls.Html.RadComboBoxItem.Select()
   at Pr.Test1.Test1_CodedStep13() in c:\Documents and Settings\Administrator\Desktop\Pr\Test1.aii.cs:line 287

CodedStep13:

            RadComboBoxItem groupNew=Pages.Proj_0.Frame1.GroupSelectorComboDiv.Find.ByExpression<RadComboBoxItem>("TextContent="+newGroup);
            groupNew.MouseHover();
            groupNew.Select();

Could you, please tell how to fix it?

Thanks

7 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 15 Nov 2010, 12:55 PM
Hello Olesya,

Thank you for contacting us and for your question.
We modified the select method recently and now it mouses over the item internally. Could you try to remove the "groupNew.MouseHover();" step from your test and run it again?

Hope this helps.

Regards,
Helen
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
0
Olesya
Top achievements
Rank 1
answered on 15 Nov 2010, 02:21 PM
Hello Helen,

Unfortunately it still fails :(

Is there another way to fix it?

Thank you
0
Helen
Telerik team
answered on 15 Nov 2010, 04:41 PM
Hi Olesya,

Could you please send us your RadComboBox declaration to examine it locally?

Greetings,
Helen
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
0
Olesya
Top achievements
Rank 1
answered on 15 Nov 2010, 05:40 PM
Hi Helen,

Our controls version is  2010.1.309.35

<DIV style="POSITION: relative; WIDTH: 100%; ZOOM: 1; DISPLAY: inline-block" id=ctrlGroupSelector_comboGroup class="RadComboBox RadComboBox_Office2007" value><TABLE style="BORDER-RIGHT-WIDTH: 0px; WIDTH: 100%; BORDER-COLLAPSE: collapse; BORDER-TOP-WIDTH: 0px; TABLE-LAYOUT: fixed; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" class=rcbHovered border=0 cellSpacing=0 summary=combobox cellPadding=0><TBODY><TR class=rcbReadOnly><TD style="MARGIN-TOP: -1px; WIDTH: 100%; MARGIN-BOTTOM: -1px" class="rcbInputCell rcbInputCellLeft"><INPUT style="DISPLAY: block" id=ctrlGroupSelector_comboGroup_Input class=rcbInput readOnly type=text name=ctrlGroupSelector$comboGroup autocomplete="off" jQuery1289838962759="9"><INPUT style="Z-INDEX: 1; BORDER-BOTTOM: 0px; POSITION: absolute; BORDER-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-LEFT: 0px; WIDTH: 242px; PADDING-RIGHT: 0px; BACKGROUND: none transparent scroll repeat 0% 0%; HEIGHT: 17px; BORDER-TOP: 0px; TOP: 2px; BORDER-RIGHT: 0px; PADDING-TOP: 0px; LEFT: 2px" class=rcbFakeInput tabIndex=-1></TD><TD style="MARGIN-TOP: -1px; MARGIN-BOTTOM: -1px" class="rcbArrowCell rcbArrowCellRight"><A style="POSITION: relative; OUTLINE-STYLE: none; OUTLINE-COLOR: invert; OUTLINE-WIDTH: medium; DISPLAY: block; OVERFLOW: hidden" id=ctrlGroupSelector_comboGroup_Arrow>select</A></TD></TR></TBODY></TABLE><INPUT id=ctrlGroupSelector_comboGroup_ClientState value='{"logEntries":[],"value":"00000000-0000-0000-0000-000000000000","text":"","enabled":true}' type=hidden name=ctrlGroupSelector_comboGroup_ClientState autocomplete="off"></DIV>

Is it what you asked?

Thanks
0
Helen
Telerik team
answered on 16 Nov 2010, 01:08 PM
Hi Olesya,

It would be better if you send us your .aspx declaration to examine it locally.

Regards,
Helen
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
0
Olesya
Top achievements
Rank 1
answered on 16 Nov 2010, 03:43 PM
Hi Helen,

Please, find the file attached.

Thanks.
0
Helen
Telerik team
answered on 16 Nov 2010, 06:25 PM
Hi Olesya,

Could you please open the combobox drop down and view the source of your page. Do you have a div element with id="ctrlGroupSelector_comboGroup_DropDown"?
If yes - you should search for RadComboBox items inside this div element, not in the RadComboBox div element.
You may try also the code below:

RadComboBoxItem groupNew=Pages.Proj_0.Frame1.GroupSelectorComboDiv.DropDownDiv.Find.ByExpression<RadComboBoxItem>("TextContent="+newGroup);
groupNew.Select();

Hope this helps.

Regards,
Helen
the Telerik team
See What’s New in WebUI Test Studio’s Q3 Release – Friday, November 19th, 2010 at 11am EST – Register Today!
Tags
General Discussions
Asked by
Olesya
Top achievements
Rank 1
Answers by
Helen
Telerik team
Olesya
Top achievements
Rank 1
Share this question
or