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

Dynamic Sites with same elements

2 Answers 58 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jonathan
Top achievements
Rank 1
Jonathan asked on 24 Jan 2012, 07:16 PM
We have multiple sites containing the same elements.  When recording a script for one site, I see that the elements are recording in a "friendly manner", but the other site isn't able to find the same elements with the same id properties.

Here is an example of the sites structure:

www.yahoo.com/yahoo4.0.login.aspx
www.yahoo.com/yahoo4.1.login.aspx

I see that there is a section where you can edit the url of where the element lies, but I was wondering if it can be wildcarded. If so, how? Meaning, I don't care what site it is on, just look for the end object id of the active browser.

Thanks,

Jonathan

2 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 24 Jan 2012, 09:14 PM
Hello Jonathan,

Please see the following excerpt from our article on how the Element Repository works:

During test execution, the root Page node is not actually used to locate the element. The execution engine only uses the Frame, Silverlight nodes, and the element's Find Expression to locate the correct element to interact with during any test step. This allows the test to continue to work when you need to test in a different testing environment (e.g. a Development server, then a Staging server, then a Production server).

The Page node's URL and CompareMode are just used to organize and group elements within the repository. They do not control how the element is found.

Have you checked the Find Settings of the elements in question and verified they are being located by ID? Are you certain the ID does not change between environments?

Finally, review our article on Using BaseURL.

Regards,
Anthony
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jonathan
Top achievements
Rank 1
answered on 24 Jan 2012, 10:51 PM
This was very helpful.  Thanks.

Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Jonathan
Top achievements
Rank 1
Share this question
or