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

Test Recording - Menu Problem

8 Answers 186 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Corina
Top achievements
Rank 1
Corina asked on 28 Feb 2013, 01:18 PM
Hello, I am trying to record a test on Kendo UI web controls (the examples) using Telerik Test Studio. Everything seems to work fine, except when I try to record actions on menus. Whenever I record a test and I click a menu item, on playback the step fails and gives the error:

Unable to locate element.

Details: Attempting to find [Html] element using Find logic (Html): [id 'Exact' menu_mn_active] AND [tagname 'Exact' li]
Unable to locate element. Search failed!

Element was found by backup search only! We recommend editing the element to correct the primary find expression. Backup search: 'xpath=/html[1]/body[1]/div[1]/div[1]/ul[1]/li[1]'
 
Can you please tell me why this occurs and maybe how I can fix it?

8 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 28 Feb 2013, 02:28 PM
Hello Corina,

When Test Studio records an action against an element it stores a primary find logic and backup find logic.
The backup find logic is an alternative way to locate an element if the first way fails. With the latest release we've modified Test Studio so the tests will now fail if the primary logic fails. To overcome this you need to change the "primary" Find Logic for that element.

If you continue to have difficulty, we'll need to reproduce the issue locally in order to investigate what is happening and find a workable solution for you. Please provide us with a copy of your test and access to your application. If it is not possible to grant us access to your application, please take a Fiddler trace using FiddlerCap and send it to us in a zip file. A Jing video demonstrating the issue may also help us to better understand what is happening. 

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Corina
Top achievements
Rank 1
answered on 28 Feb 2013, 03:07 PM
Actually, I performed a very basic test on the examples provided by Telerik for the Kendo UI controls. I started recording a test, went to the Web controls examples, Menu category, Basic usage and then clicked on the first menu option, "Products" and then on the submenu item "Furniture", that is all.  
0
Accepted
Plamen
Telerik team
answered on 28 Feb 2013, 05:47 PM
Hi Corina,

Thanks for providing the steps. I am not sure whether this is the case, but you are probably not using a step to expand the menu and Test Studio is unable to find the element. All options in the submenu will be loaded only if you expand the menu. Please try to add a mouse hover step as seen in this video and let me know if that helps. 

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Corina
Top achievements
Rank 1
answered on 01 Mar 2013, 09:46 AM
I did not use the hover action, I actually clicked on the menu item to expand, and the error is there, when clicking on the menu item, the test didn't even get to the part when selecting a submenu item.
0
Plamen
Telerik team
answered on 01 Mar 2013, 10:37 AM
Hi Corina,

If you want to use mouse clicks instead a mouse hover steps, after each Click step you also need to add a Wait for Visible step in order to wait for the submenu item to be visible prior clicking it. See this video for a demonstration. 

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Corina
Top achievements
Rank 1
answered on 01 Mar 2013, 11:25 AM
I think I expressed myself wrong. I attached an image of the menu I am trying to test. The test consists of a simple step sequence: go to menu page, click menu item "Products" and then click "Back" button to go to the main page. The problem is that it doesn't recognise the menu item itself. That's all, no submenu clicks are involved, at this point I am not interested in clicking a submenu.
0
Corina
Top achievements
Rank 1
answered on 01 Mar 2013, 12:03 PM
I solved it, it worked when I used the highlighting feature and explicitly inserted the "left mouse click" on the "Products" menu item. That was the only way it worked, simply clicking on it doesn't.

Thank you for your help 
0
Plamen
Telerik team
answered on 04 Mar 2013, 06:00 PM
Hi Corina,

Glad to hear you got it working. Thanks for the update!

Regards,
Plamen
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Corina
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Corina
Top achievements
Rank 1
Share this question
or