SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Dec 2001
    Location
    chennai,TN,India
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Handling random Popup Windows

    Hi Gurus,
    I'm using Silktest in WINNT environment for testing a web application (Browser :IE5.0).While running silk test , Network authorization window asking for username and password popsup at unpredictable time (occurence is random).Silk test closes this window because of which i'm getting http 401 -authorization error and the testcase fails.There's absolutely no means of preventing the occurence of this authorization window.So, please help me out to handle such random windows.:confused

    Thanks and Regards,
    Rajesh.

    ------------------

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handling random Popup Windows

    It sounds like one issue you may want to tackle before tweaking your test case is why the box is coming up. Do you get the authorization box if you're working through the test case manually? Why does this thing keep popping up? What will the end users think of this? If there's a way your developers can get everything to work without popping up the box, that would be great.

    If you're getting the auth. box as a result of loading a new page, you could write a function to handle it. Let's say for the sake of clarity you call this function HandleLoginBox.
    This function would check for the existence of the authorization box and if it's there, plug in the appropriate username/password combination. It would take as arguments the username and password you probably already have defined in your testcase.
    Now, the icky part is you would have to insert a call to HandleLoginBox every time you do something that loads a new page (if that's where you are in fact seeing the box). You may have some other functions already working when a new page is loaded, for example to make sure there wasn't an error. If that's the case, I'd call the new function (HandleLoginBox) from any functions you may already have.

    ------------------

  3. #3
    Member
    Join Date
    Dec 2001
    Location
    chennai,TN,India
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handling random Popup Windows

    Hi Steve,
    Thanks for ur suggestion.This Authorization box is not a part of the site but of the network i'm working.Is there a way to call a function when some unknown window ,not included in the testcase popsup ??

    ------------------

  4. #4
    Senior Member
    Join Date
    Oct 2000
    Location
    Laurel, Maryland, USA
    Posts
    204
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handling random Popup Windows


    Just a thought - one not-so-nice way to handle this would be to run a separate thread that looked for the unexpected Authorization window and interacted with it while the main thread kept running. You could add the Authorization window to your lwLeaveOpen variable so that your main thread wouldn't close it. Your second thread would do a simple loop which checks for the unexpected window. If it finds it, it logs in (or does whatever you want to do with it).

    I have used the parallel statement successfully, but I have also noticed an increase in the 'wierd' failures from Silk when I did use it. Segue Support was no help at all with the strange failures I received, but I was able to work around them.

    Good Luck

    ------------------
    Atlee
    Atlee

  5. #5
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handling random Popup Windows

    Does the box you get look like this one?

    If so, I know for sure you can dispose of it in a test case because I've seen those.
    Really, though, I would think you'd be able to handle any kind of popup window, as long as you're looking for it at the right time.

    Doing a separate thread is a great idea as well, and would be a good challenge (well, for me at least ).

    ------------------

  6. #6
    Member
    Join Date
    Dec 2001
    Location
    chennai,TN,India
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handling random Popup Windows

    Yes Steve.I'm getting a popup window like that.How did u disposed that in a testcase?.Anyhow,I'll try the thread method Atlee has suggested.
    ------------------


    [This message has been edited by rasu123 (edited 12-27-2001).]

  7. #7
    Senior Member
    Join Date
    Sep 2000
    Location
    Twin Cities, MN, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Handling random Popup Windows

    I don't have the actual code handy, but the flow was something like this:

    Do Something
    Call function (username, password)
    Do Something
    Call function (username, password)

    function (username, password):
    If there's a login box
    TypeKeys username & Tab & password
    Click OK
    End

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:21 AM.

Copyright BetaSoft Inc.