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

Lots of duplicate root elements in element tree

3 Answers 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 19 Jun 2013, 02:54 PM
I'm trying to create web tests in Test Studio for a page which subsequently opens a new popup and opens a silverlight application inside an IFrame within that popup.

When I am recording tests in Test Studio I seem to end up with lots of duplicate root level elements, with say one individual element underneath each. This seems to cause particular problems with the IFrame holding the silverlight application and I found if I set UseQuery to false and cleared out the BaseURL and Query fields in the properties they generally combine back into one root element, which is fine. Although I seem to have to do this for every single new step I record, which is slightly annoying!

As soon as I run the tests on a different machine, additional steps are creating different root elements again and as the URL and title bar were different for that machine it seemed impossible to combine them all back into a common base at this point. 

I just want it to always ignore things like the title bar, URL and query strings as these will obviously be different for each test run and each machine that the tests are worked on or run on. But all I seem to end up with is a mess of elements in this tree.

Could somebody point me in the right direction as to how to manage this element tree correctly? Because of all the duplicates it's very hard to tell what element belongs to which version of the base page or IFrame and so tests steps consistently fail and I'm not sure why. To me it seems strange that there are all these properties mapped to the machine the tests are being recorded/run on, I have bound data for things like the IP address to browse to etc. so I would expect to be able to continue writing tests or running them on any machine and it would act the same way.

Any help would be appreciated!

Thanks.

3 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 20 Jun 2013, 01:42 PM
Hi Adam,

The default for the Elements Page Compare Mode in Project Settings > Recording Options is FullPathAndQuery and when Test Studio is using that recording mode, it will create separate pages for the target elements when the queries in the URL differ. To overcome this and merge the existing duplicates, you'll need to set each page node's CompareMode property to FullPath, then refresh the Elements Explorer.

Please see this article for more information.

Hope this helps. 
 

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Adam
Top achievements
Rank 1
answered on 21 Jun 2013, 06:44 AM
Hi Boyan,

Our compare mode is already set to FullPath on all pages, but this doesn't seem to make any difference? The page elements all look the same to me but they don't merge together. It seems to be using the page title as well possibly? As that differs.

I'll have a look at the article you sent, thanks.

Regards,
Adam.
0
Boyan Boev
Telerik team
answered on 21 Jun 2013, 01:03 PM
Hello Adam,

You should set it in Project Settings > Recording Options as I mentioned it in my last post.

Please read the article which describes how to merge page nodes and let me know if it helps. 

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