Dynamic Sites with same elements

3 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    23 posts
    Member since:
    Jan 2012

    Posted 24 Jan 2012 Link to this post

    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. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 24 Jan 2012 Link to this post

    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.
  3. Jonathan
    Jonathan avatar
    23 posts
    Member since:
    Jan 2012

    Posted 24 Jan 2012 Link to this post

    This was very helpful.  Thanks.

Back to Top