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

Pop-up Window Testing

13 Answers 522 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.
Wai-Kit
Top achievements
Rank 1
Wai-Kit asked on 02 Nov 2010, 09:19 AM
Hi Telerik Team,

I am wondering how do i carry out Web UI Testing on web applications that use many pop-ups?
Here are some detailed questions i hope that to gather some feedback.
1) Is it able to consistently use a correct hpyerlink pop-up? Example, a pop-up button/link to view shopping cart details and verify this details. Imagine an query string(encrypted  or unencrypted) containing a key for the shopping cart details.
 2) Is it able to test the contents of the pop-ups and verify them? Example, a button on the pop-up triggers an event  on the main web page to change it's label's text or vice versa.

Thanks
Wai Kit

13 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 02 Nov 2010, 04:42 PM
Hi Wai-Kit,

When a test is executed, we identify which window is the correct popup to use by its title and the URL the popup is using. Most of the time this is very reliable. Sometimes we run into problems if the URL contains some variable piece to it, e.g. a changing cart id, a changing session id, a changing user id, etc. Usually we're able to overcome these situations by using what we call a partial match. We'll modify what got recorded slightly so that it will use a partial match scheme and remove the part of the URL that keeps changing in between test runs.

Yes, we can fully all the elements contained in the popup. If clicking something in the popup changes the main window, you simply need to perform a "DOM refresh" for our tool to pick up the change. This is sometimes needed (usually only for Ajax postback's) because we cache a copy of the DOM for performance reasons. We try to keep our local copy current and fresh automatically, but cannot detect when the DOM is changed in the background.

Another area we still have trouble with (we are working to improve) is when an action pops up a modal dialog. We can handle the case of a button click opening a modal  window, but have trouble if a menu item opens a modal. We have ways of working around this problem. We'll work with you on how to handle these situations if needed.

Sincerely yours,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Wai-Kit
Top achievements
Rank 1
answered on 03 Nov 2010, 02:58 AM
Hi Cody,

Regarding the mechanism of handing the dynamic URL in the pop up,
1) Is this mechanism built into the software?
2) If this mechanism is built into the software, how do we incorporate it into our test? 

Thanks
Wai Kit
0
Cody
Telerik team
answered on 06 Nov 2010, 12:23 AM
Hi Wai-Kit,

The feature is built-in, but you may need to do some minor manual adjustments to make it work right. For example, when we record connecting to a popup window, we'll record the full URL that was present at the time of recording. Usually all you need to do is remove the query string portion from the recorded URL (this is the part beginning with the ? character and everything following it) and make sure the "IsUrlPartial" property of the step is set to True.

Have you downloaded and installed the trial of the software? The best way to understand this is to see it in action. I'll be glad to assist you with any problems you have using it for testing your web application.

Kind regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Yan
Top achievements
Rank 1
answered on 01 Feb 2012, 11:23 AM
Excuse me
talking about "partial match"
can you give me an example?
that will help me a lot.
i am just begin to use this software
0
Plamen
Telerik team
answered on 01 Feb 2012, 04:37 PM
Hi Yan,

Please check at the bottom of this article.

A partial match means it will look for the "PopupUrl" string as shown in the test step properties anywhere within the URL of the popup window.
 
For example if we have the following full Popup Url: 
http://www.domain.com/search?1234567890

Next time the Popup appear the query string portion of its URL will be different. Let's say:
http://www.domain.com/search?0987654321
 
In that case, to find the Popup successfully, we need to remove the dynamic portion from the URL and set the "IsUrlPartial" property to True. At the end, the PopupURL should look like this:
http://www.domain.com/search

Hope this helps!

Kind regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Yan
Top achievements
Rank 1
answered on 02 Feb 2012, 02:55 AM
Hi,Plamen
thanks for your explaination.
now i know how it works with popups.
but our system uses the frame to pop up.
so the id is variable,like ctl00_ctl00_RadWindowManager113XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.

how can i find the controls on this frame?
i tried to use "ctl00_ctl00_RadWindowManager113.*"
or "ctl00_ctl00_RadWindowManager113".
but i didn't work

i can not find the things like "IsUrlPartial" to set.

i will try to read more of your guide book,may be will find the answer.

if you have time,pls give me the way to solve it
thank you.
0
Yan
Top achievements
Rank 1
answered on 02 Feb 2012, 03:14 AM
i have found my answer by using "~"
thanks again
0
Plamen
Telerik team
answered on 02 Feb 2012, 09:29 AM
Hi Yan,

I'm glad to hear the issue is resolved. Please feel free to contact us again if you have any questions.

Kind regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Renjila
Top achievements
Rank 1
answered on 07 Aug 2018, 03:31 AM

Hello,

I am working with an application developed using Sencha. Please let me know how to verify the Extjx.Toast element.

Thanks in advance,

Renjila

0
Renjila
Top achievements
Rank 1
answered on 07 Aug 2018, 08:46 AM

Hello,

To add more details

I need to validate the pop up existence  upon an action. However , the toast pop up will disappear soon once it appears. So i am not sure how to edit this toast element. 

Upon locating the toast element , it showed as  [id 'Exact' ext-element-1][tagIndex 'Exact' div:2492]

I tried to edit the tagindex expression and changed it to regexpression match .Also i tried with contains. In both cases , the test failed saying 'Element could not found'

Nevertheless, I tried to run the test with the original search criteria ie;   [id 'Exact' ext-element-1][tagIndex 'Exact' div:2492].

It fails inconsistently with the following error.

Unable to locate element. Details: Attempting to find [Html] element using 
Find logic 
 (Html): [id 'Exact' ext-element-1][tagIndex 'Exact' div:2492]

Unable to locate element. Search failed!

Element was found by backup search only! We recommend editing the element to correct the primary find expression. 
Backup search: 'xpath=/html[1]/body[1]/div[5]/div[1]/div[1]/div[1]/div[1]' 

Please let me know how to proceed on this.

 > how to deal with the pop ups that disappear after a few secs. In this case its Extjs.Toast.

 > how to use the backup search criteria as the primary one ie; the x path

Thanks in advance

 

 

 

 

0
Elena
Telerik team
answered on 09 Aug 2018, 03:39 PM
Hello Renjila,

Thank you for reaching us out. 

i would recommend you change the find expression of the element to only use the id and tagName properties. That way you shouldn't be dependent on the tag index and as I assume the id is unique and not dynamic, Test Studio should locate the element. 

I hope this will work for you. In case it is not I would like to kindly ask for a sample public accessible application which I could test for the same on my end. Thanks in advance! 

Regards,
Elena Tsvetkova
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Renjila
Top achievements
Rank 1
answered on 15 Aug 2018, 07:18 AM

Thank you for your reply.I edited the search criteria for the element as per your inputs.

Regards,

Renjila

0
Elena
Telerik team
answered on 16 Aug 2018, 02:12 PM
Hello Renjila,

I am glad to know I helped. 

Regards,
Elena Tsvetkova
Progress Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Wai-Kit
Top achievements
Rank 1
Answers by
Cody
Telerik team
Wai-Kit
Top achievements
Rank 1
Yan
Top achievements
Rank 1
Plamen
Telerik team
Renjila
Top achievements
Rank 1
Elena
Telerik team
Share this question
or