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

problems with locating item second time coded step is run

1 Answer 15 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeanie
Top achievements
Rank 1
Jeanie asked on 27 Sep 2014, 01:20 AM
Hi there,

I have a coded step that locates a sub-menu item and clicks on it to open a particular page.
Early in my test, this step runs and works fine.
Later in the test I want to go to the same page, and I made a copy of the same step.  However, the step no longer works the second time it runs - and I can see the mouse shoot over to the corner of the screen for some reason.
Here is the code inside the step:

HtmlControl ulList = Pages.EVCloudAdministration.AccountsMenuUL;
HtmlListItem accMenuList = uList.Find.ByExpression<HtmlListItem>("tagname=Li", "innertext=New Archive");
accMenuList.MouseClick();


I have tried doing things like refreshing the dom tree, some waits, and even refreshing the whole page and navigating back to where I need to be, but nothing seems to help.  Any suggestions on what I can try?  Thanks!

1 Answer, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 30 Sep 2014, 06:58 PM
Hi Jeanie,

...I can see the mouse shoot over to the corner of the screen for some reason

This symptom implies one of two possibilities:
  1. The test is finding the wrong element, such as a hidden element, which has coordinates of 0, 0
  2. The browser is giving Test Studio incorrect screen coordinates when we ask it where is the target element.

Is this "New Archive" <li> element visible at the time Test Studio is trying to click on it? It's important that it be visible in the browser window.

To help diagnose this further I'll need a copy of the test and the ability to execute it on my machine so I can study the problem and come up with a solution for you.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Jeanie
Top achievements
Rank 1
Answers by
Cody
Telerik team
Share this question
or