Pop-up Window Testing

9 posts, 0 answers
  1. Wai-Kit
    Wai-Kit avatar
    4 posts
    Member since:
    Sep 2010

    Posted 02 Nov 2010 Link to this post

    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
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 02 Nov 2010 Link to this post

    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
  3. Wai-Kit
    Wai-Kit avatar
    4 posts
    Member since:
    Sep 2010

    Posted 02 Nov 2010 Link to this post

    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
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 05 Nov 2010 Link to this post

    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
  5. Yan
    Yan avatar
    10 posts
    Member since:
    Feb 2012

    Posted 01 Feb 2012 Link to this post

    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
  6. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 01 Feb 2012 Link to this post

    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.
  7. Yan
    Yan avatar
    10 posts
    Member since:
    Feb 2012

    Posted 01 Feb 2012 Link to this post

    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.
  8. Yan
    Yan avatar
    10 posts
    Member since:
    Feb 2012

    Posted 01 Feb 2012 Link to this post

    i have found my answer by using "~"
    thanks again
  9. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 02 Feb 2012 Link to this post

    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.
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!