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

Proper way to add elements into elements explorer

10 Answers 172 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Don asked on 13 Oct 2015, 10:15 AM

Hi,

I have a question about proper way to add elements into elements explorer to be able to use them in tests, that will be running on different application instances.

This means that i have 2 application versions deployed on a server,

for example: http://qadomain1.com/Baseline_Buildhttp://qadomain1.com/Current_Build

As you may see, there are baseline (production) build, and current build. I am running the same performance tests agains them, and then comparing the results.

On the phase of writing tests, I've faced the problem on adding the element to element explorer with the settings, that will work on both app versions in the same time.

For example i have some span element located inside the frame on app page, and i want to check if it's visible.

I can add it into elements explorer, but if the app url on the moment of adding was set to baseline build, the compare/entire URL for the page are set to the it, and the element is not found when running a test against current build.

Which compare mode should i use for such purposes?

Currently for the case I've described it looks like:

Page settings:

BaseURL: http://qadomain1.com

CompareMode: http://qadomain1.com (disabled field)

EntireURL: http://qadomain1.com/Baseline_Build/workgroup/Users.aspx (disabled field)

Path: /Baseline_Build/workgroup/Users.aspx (disabled field)

Frame dialog settings:

UseBaseUrlHost: disabled

10 Answers, 1 is accepted

Sort by
0
Accepted
Pravallika
Top achievements
Rank 1
answered on 14 Oct 2015, 12:14 PM

Hi,

Could you check with the below settings:

CompareMode : RelativePathOnly

BaseUrl: null/blank

Path: http://qadomain1.com (By setting this, compareUrl and EntireUrl will be populate same as path i.e. http://qadomain1.com)

AlwaysUseTitleInCompare : False

Query : null/blank

Title : Your page title

 

This will enable all the elements to be under a single page irrespective of the build.

 

--

Pravallika.

0
Boyan Boev
Telerik team
answered on 15 Oct 2015, 12:01 PM
Hi,

@Pravalika, thank you for sharing your knowledge with the community. We really appreciate it.

@Don, please let us know if you need further assistance.

Thank you!

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Don
Top achievements
Rank 1
answered on 15 Oct 2015, 01:55 PM

Thank you for the reply, but seems like this solution doesn't works for me. Frame can not be found on the page.

Looks like situation is quite more complicated that I've previously described.

Application is deployed into several servers (so the base URL may not work when running against them),

if to limit the test usage to 1 server i.e. http://qadomain1.com, then I have a page with a lots of id's in URL. These Id's are changing, depending on the current logged on user, workgroup and other parameters.

In overall i have a page with entire URL that looks like this:

http://qadomain1.com/Current_Build/​someAppArea/​Component.aspx?pid=621924664&gid=1500496933&Name=saved&ID=1608338706&frt=1

For the page settings CompareURL and path look the same. Other fields are blank or disabled. Compare mode was set to FullPathAndQuery.

On this page there is a frame (actually there are two frames located inside each other).

On the FrameInfo dialog i have the following parameters:

BaseURL: http://qadomain1.com/Current_Build/​someAppArea/dialogs/DialogName.aspx​

Id: blank

Index: 1

Name: DialogName

Query: pid=621924664&gid=1500496933&et=Element&qDB=undefined&Key=635804981939799759ElementContent

Src: http://qadomain1.com/Current_Build/​someAppArea/dialogs/DialogName.aspx​

Tag: blank

UseQuery: disabled

These are the default parameters, after adding the element on the frame into explorer.

The idea is to find the element on the page inside the frame and handle the dynamic parameters like ID's and server/instance names.

0
Accepted
Pravallika
Top achievements
Rank 1
answered on 16 Oct 2015, 05:29 AM

It is the same scenario for us. We have dynamic pages with changing ids and query in the url everytime and the solution which i posted works all the time for us.

In the compareMode, we set the option to 'RelativePathOnly' which essentially means that only the part of url which you are going to mention will be searched irrespective of the query params in the url.

Please find the attached image where we have a page name and its properties, a frame and element inside it, and its properties.

0
Boyan Boev
Telerik team
answered on 20 Oct 2015, 08:06 AM
Hi Don,

Have you set the Compare mode to RelativePathOnly and specified the common part of the URL only?

Let me know the results.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Don
Top achievements
Rank 1
answered on 20 Oct 2015, 03:25 PM

Hi,

Yes, setting the ​compare mode mode to RelativePathOnly and specifying the common part of the URL helped me.

Now i have another question regarding finding the element on the specific page.

I have several test instances where the test will be executed, but in specific cases, URL may have nothing common .

  1. http://qadomain1.com/Baseline_Build
  2. http://qadomain1.com/Trunk_Build​
  3. http://qadomain2.com/Some_Build​

Almost as described hereThe base URL for project settings is currently set to http://qadomain1.com/Baseline_Build. I have an element that is added to some app page on specific instance.​

The full URL to that page for this specific instance looks like this:

http://qadomain1.com/Baseline_Build/area/PageName.aspx?pid=1​2345&gid=12345

http://qadomain1.com/ - the domain, that may change.

/Baseline_Build/ - instance name that may change also.

/area/PageName.aspx - static path to page.

?pid=1​2345&gid=12345 - dynamic query.​

The idea is to add element/page to element explorer that will be found on every of that instances listed above (if i will use running tests via test lists with different base url's).

What is the best way to do this?

By setting for the page element the base URL like: 'http://qadomain1.com/Baseline_Build' and limiting the path to 'area/PageName.aspx' this will make the EntireURL look like 'http://qadomain1.com/Baseline_Build/area/PageName.aspx' which is ok. But in this case, as I understand the CompareMode should be changed to 'BaseURL'?

And the project BaseURL should be limited to 'http://qadomain1.com/'.

Will this work, if I would create a test list, and in test list settings the BaseURL will be 'http://qadomain2.com/​Some_Build​' ?

Will the test list â€‹BaseURL used in​stead page element BaseURL when the search for the element will be performed on a completely different server?

Thanks in advance.

0
Don
Top achievements
Rank 1
answered on 20 Oct 2015, 03:45 PM
[quote]Don said:

The full URL to that page for this specific instance looks like this:

http://qadomain1.com/Baseline_Build/area/PageName.aspx?pid=1​2345&gid=12345

[/quote]

Almost forgot, in the same time â€‹I need to somehow handle the dynamic ID's in the query, so the element should be succesfully found on the URL like

http://qadomain1.com/Baseline_Build/area/PageName.aspx?pid=​xxxxx&gid=xxxxx
0
Boyan Boev
Telerik team
answered on 23 Oct 2015, 10:20 AM
Hello Don,

Yes you are correct. If you set BaseUrl for a particular test list it will be used during the execution.

'http://qadomain1.com/Baseline_Build/area/PageName.aspx' which is ok. But in this case, as I understand the CompareMode should be changed to 'BaseURL'?
And the project BaseURL should be limited to 'http://qadomain1.com/'.

This is also correct. Please give that a try and let us know the results.

Thank you!


Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Don
Top achievements
Rank 1
answered on 27 Oct 2015, 02:53 PM
I've changed the BaseURL and CompareMode and it works well for me now.
0
Boyan Boev
Telerik team
answered on 29 Oct 2015, 11:52 AM
Hi Don,

Happy to hear that.

If you need further assistance please let us know.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Don
Top achievements
Rank 1
Answers by
Pravallika
Top achievements
Rank 1
Boyan Boev
Telerik team
Don
Top achievements
Rank 1
Share this question
or