This creates duplicates in the element explorer as shown in the attachment.
Also, There is no option to move the elements in the required path/page in the element explorer in otherwords there is no Cut/copy paste option avbailable in the element explorer.
Thanks!!!
Veera
3 Answers, 1 is accepted
since you're working on two different servers (and therefore 2 different URLs) this makes the two applications unique as far as WebUI Test Studio is concerned.
The elements in Elements Explorer are used by your test. Even though the elements appear duplicated and show under a different page name, the test usually works just fine anyway when run on different servers. This is because our framework doesn't actually use the Page definition (i.e. the URL) that a referenced element appears under when looking for an element. It only uses the find expression.
So let's say you recorded a Click step on server 1, then execute that test on server 2. The test usually will work because the Click step will grab the Find Expression for the element it is linked to and look for that element on whatever the server and page is being actively displayed.
If this duplication really bothers you (really the only problem is a cluttered looking Elements Explorer) you can manually modify the properties for the Page definition nodes. Update them to match, then close and reopen your test project. WebUI will perform an element merge when it loads the project and now they will appear under just one Page node.
Elements are removed automatically when a test step associated with them is deleted and it is no longer referenced by a different test step. You can also add elements manually (Option "Add to Project Elements" from the pop-up menu) and you're allowed the Delete these elements afterwords.
I hope this helps, please don't hesitate to contact us again if you have more questions!
Greetings,
This really helped me in understanding the element explorer. But I still have some clarification.
Question 1?
I am not able to move the elements from one page to other page in the element explorer. Attached Screen shot. Here I want to move the elements from Page "Pg_hCueHomePage0" to "Pg_hCueHomePage". Currently I am not able to move the elements.... Is there any option available?? Renaming is not working....
Question 2? The duplicates is created while recording on the same elements in different servers. We have 2 QA Servers to test. We are doing our recording stuffs in 2 servers. If day 1 i am working on server 1, day 2 in server 2... this really creates lot of duplicates..... Is there any workaround for it?... Currently not able to delete the elements if the elements are used in the test step.
Question 3? Is there any option to update the properties from the application directly to the element explorer? This is required for us when the application changes the element properties during the course of time.
Question 4? Record a step, convert them to coded step, delete the recorded step.. This delete the element from the explorer causing the codedstep to fail.. Do we have workaround fort it?
Thanks.
Veera
Question 1) You're right you cannot move elements from one page node to another page node. This is by design and if you think about it, you really should not be allowed to do this either. Elements belong to the page they were recorded against and must always stay with that page.
However I have described how you can merge your duplicate page nodes (that you see in your screen shot) in this new KB article. The other thing you can do to merge duplicate pages together is to manually modify the BaseUrl property on the page nodes. Make them the same then click the Refresh button. Pages that are duplicates according to the CompareUrl property value will automatically be merged together along with the elements under it.
Question 2) First we highly recommend always recording your tests against the same test server. If you really must record tests against two different servers you should take advantage of our BaseURL feature. There are two parts to this feature:
- Setting the BaseURL for recording
- Setting the BaseURL to actually use during playback
- On the Project click Show Settings
- Click the Recording Options tab
- In the BaseURL enter the URL of the host you will be recording your test against (e.g. http://qa.testserver_01)
- Click a different property just so that the above change is stored
- Click OK to save your change
During playback you want to create a test list, place your newly recorded test in it, and modify the BaseURL property for that test list.
- On the Test Lists tab select the test list you want to change the setting for
- Click Edit Settings in the ribbon bar
- Scroll down to BaseURL
- Enter the URL of the host you want the test list to actually use (e.g. http://stage.testserver_02)
- Click OK to save the change
You can still take advantage of the BaseURL feature on already recorded test. Modify the URL of the NavigateTo steps e.g. from http://myserver.com/default.aspx to ~/default.aspx. Then set the BaseURL of the test list and I previously described.
Question 4) This appears to be fixed in our latest internal build, 2010.3.1307. Please give that version a try and let me know if this problem still occurs.
Best wishes,Cody