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

Verifying Dynamic Elements

2 Answers 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Rodolpho
Top achievements
Rank 1
Rodolpho asked on 24 May 2011, 08:39 PM
Hi, I'm recording tests for a website that generates dynamic elements. For e.g., the success bar, can be loaded in Div, Div1, Div2 or DivN. And it has other dynamic levels above this Div. My Questions is, how could I identify, to verify these elements?

Rodolpho Dutra

2 Answers, 1 is accepted

Sort by
0
Wayne Mather
Top achievements
Rank 1
answered on 25 May 2011, 06:27 AM
Hi,

I too am wondering how to enhance the capabilities of finding a HTML element within the DOM when dynamic data is being returned back to the browser. I look forward to telerik's response that maybe able to point me and the parent poster into the deeper bowls of matching elements and identifying them in the DOM.

NOTE: This is with Telerik TestStudio Evaluation (Comparing against rival product to decide which automated software to purchase)
0
Stoich
Telerik team
answered on 27 May 2011, 12:47 PM
Hi guys,
    your questions seem to be slightly different:
@Wayne: it really depends on which part of an element is dynamically-generated. Most commonly IDs for elements are generated dynamically. Check out this KB dealing with that particular case:
http://www.telerik.com/automated-testing-tools/support/kb/working-around-dynamically-generated-id-attributes.aspx

@Rodolpho: in your case you want to make sure the Find Logic for the element is in no way related to its position within the DOM of the page. For instance if the Find Logic is based on an element's tagname and ID then you shouldn't have any problems. However, if the logic uses Xpath or a "then"-type of statements then it will fail because those rely on the DOM structure. Check out this section of our Docs:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/elements-pane-overview/change-how-an-element-is-found.aspx

Regards,
Stoich
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Rodolpho
Top achievements
Rank 1
Answers by
Wayne Mather
Top achievements
Rank 1
Stoich
Telerik team
Share this question
or