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

Unable to Locate Element / Search Failed / Mouse Hover

7 Answers 159 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
garett
Top achievements
Rank 1
garett asked on 21 Dec 2010, 09:17 PM
I recorded quite a few tests that have a mouse hover over event.  The tests work the same day I record the test but the next day the tests fail.  The solution is to re-record the hover over step and the step after (clicking the sub-menu item).  Please advise.

I attached some screenshots.

In the attachment, step 5 is the hover over and step 6 is the clicking of the sub-menu item.  Even though it is showing that step 7 is failed, when I re-record steps 5 and 6, the whole test passes.  But I have to re-record this every couple of days and it seems counterproductive.

Thanks,

Garett
504.487.6872
garett.majoue@geocent.com

7 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 21 Dec 2010, 09:38 PM
Hi garett,

It sounds like you may be dealing with a dynamically changing control ID somewhere in your test. The screenshots don't give us enough information to identify which one is changing (and slide3 isn't legible as it appears to be greatly shrunk).

What you can do to significantly help us identify the root problem is to send us two copies of the same test.

  • The first copy is the test in working condition today
  • The second copy is the test re-recorded after it broke and you had to re-record your steps in order to fix it.
Once we receive these two copies we'll be able to study the differences and identify exactly what/where the change is occurring and offer you a method to permanently fix this.

Kind regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
garett
Top achievements
Rank 1
answered on 21 Dec 2010, 10:03 PM
Cody,

Two questions:

1. Which extension/format of the test do  you want?  The .aii, the .aii.css, or the .resx?
2.  Should I email the tests to you or attach to this post?

Thanks,

Garett
garett.majoue@geocent.com
0
Cody
Telerik team
answered on 21 Dec 2010, 11:46 PM
Hi garett,

At a minimum I need the .aii and matching .cs files. The matching .resx is nice to have but not required. It contains the story board images. If you place the files into one or more .zip files you can attach them to a forum post.

Regards,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
garett
Top achievements
Rank 1
answered on 22 Dec 2010, 05:37 PM
Cody,

Attached are the newly recorded test files and the old one.

Garett
0
Cody
Telerik team
answered on 22 Dec 2010, 08:32 PM
Hi garett,

This is interesting. Have a look at the two attached screenshots. They show the Find Expression being used in step 6 by the old and the new test. If you look closely you'll see that the tagindex has a different value. In the old test it is looking for index 13 while in the new test it is looking for index 14. I suspect this is the root problem.

I am going to bet that what you see, when the test stops working, is that the Mouse Hover action works just fine (I don't see any differences in step 5) but the selection in step 6 isn't bring up your /Admin/Scanners.aspx page. Am I correct?

What this tells me is that the structure of your DOM (the HTML for the webpage) is actually changing, not the ID's as I originally suspected. Since the intended result of steps 5 & 6 are to open your /Admin/Scanners.aspx page, the easiest way to make the test run reliably is to replace steps 5 & 6 with a NavigateTo step, like step 1 but navigate to /Admin/Scanners.aspx instead. The only drawback is yo won't be testing the dropdown specifically. Would this approach work? Otherwise we have to try and figure out why the HTML is significantly changing between days.

All the best,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
0
garett
Top achievements
Rank 1
answered on 28 Dec 2010, 07:20 PM
Cody,

Your solution worked.  I would like to get to the bottom of this issue and figure out why the HTML is significantly changing between days.  Could you please help me look into this?

Thanks

Garett Majoue
garett.majoue@geocent.com    
504.487.6872
0
Cody
Telerik team
answered on 28 Dec 2010, 07:45 PM
Hi garett,

I can only get you started down that path. You'll need to get your developers involved to figure out how/why the page structure is changing so significantly. It might be just the menu structure is changing.

What you'll need to do is:

  1. capture the HTML for it one day
  2. compare it to the HTML after it changes
  3. bring those identified changes to your developer and ask WHY.

Greetings,
Cody
the Telerik team
Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
Tags
General Discussions
Asked by
garett
Top achievements
Rank 1
Answers by
Cody
Telerik team
garett
Top achievements
Rank 1
Share this question
or