SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jan 2000
    Location
    Mountain View, CA, USA
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Alerts when page refreshes

    I'm trying to use BrowserMessage to get a handle on a dialog box in a web application. This works nicely except if the dialog box is displayed while the page is repainting. The page stops repainting (perhaps due to the nature of JavaScipt Alerts?), and won't resume until the dialog is taken care of.

    An actual user would read the message, click OK, and carry on with the newly refreshed page. Unfortunately for this Silk novice, the virtual SilkTest user can't detect the dialog. BrowserMessage.Exists() stalls until the page is completely ready, which won't happen until the BrowserMessage is closed. -- Catch 22.

    I played with a bunch of the Agent options, but nothing seemed to help.

    Any tips?

    --- thanks!

  2. #2
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Javascript Alerts when page refreshes

    Is this happening with both Netscape and IE browsers, or just IE?

    A few months ago I had a problem like this with IE 4, whereby the dialog hung the agent. This did not occur when a similar [but not identical] dialog was presented under NS. I was never able to solve the agent hang condition under IE.

    Is this your situation?


  3. #3
    Junior Member
    Join Date
    Jan 2000
    Location
    Mountain View, CA, USA
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Javascript Alerts when page refreshes

    Yes, indeed, it's an IE-only symptom. Netscape can find its BrowserMessage even if the page hasn't completely refreshed. This does help me narrow down the problem. But alas, Netscape cannot find the little HTMLImage that I need to click in order to generate the message in the first place. (Nobody gets an easy day today.)

    The flimsy hack I used to test this under NN was to click the image's location on the BrowserPage.

    Terry et al., this is a blocking situation for me. I don't know what to do with this unreachable dialog (unless I search for all dialogs on the desktop and try to close it that way. -- let me think on that.) Any hints as to what you did to dig your way out of this would be gratefully accepted.

    --- thanks

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Javascript Alerts when page refreshes

    You can change the browser extention options and run a line of agent code to be able to "See" the HTML Image under most cases in Netscape. If I remember correctly you need to have both Java options selected in the Extentions Dialog box and when you run the testcase you first need to run a line of code:

    BrowserPage.SetUserOption ("EmptyImageLocationsDiffer", TRUE, USEROPT_DEFAULT)

    Note- This line of code will make IE hang, You need to switch it on or off using a GetBrowserType() to determine which browser is running. This used to work well in Silk2.1.4 and I see it mentioned in the Silk 5.02 release notes as a solution for merged links. I haven't tried ti recently but I'm pretty sure it will work for you.

    Another note - Run this line of code before you record you Netscape tags for the HTMLImage object you want to find.

    [This message has been edited by woodman (edited 02-02-2000).]

  5. #5
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Javascript Alerts when page refreshes

    Chris,

    Did my solution help? I would like to know because I am likely to run into the exact problem you are having.

    Thanks,
    Tom

  6. #6
    Junior Member
    Join Date
    Jan 2000
    Location
    Mountain View, CA, USA
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Javascript Alerts when page refreshes

    Did it help? Well, not in my case. I found out that the image is recognizable the first time that the page is loaded. As soon as the BrowserMessage appears and is dispatched, the images are no longer found. Perhaps it has something to do with the HTML that is being generated when the form is submitted. (But, page source before and after is the same.) Refreshing the page seems to make the image recognizable again, but that is not always an option. I may need to come up with a way of storing the coordinates of these controls when the test starts so that I can still interact with them after the inevitable BrowserMessage appears. Better ideas are welcome....



  7. #7
    Member
    Join Date
    Jul 1999
    Location
    Raleigh- North Carolina
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Javascript Alerts when page refreshes

    Have you tried to a SetTrap in your testcase enter?

 

 

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 05:56 AM.

Copyright BetaSoft Inc.