Results 1 to 4 of 4
  1. #1

    How to check a double confirmation windows


    I have a web-page which I need to test using TC(with JScript).
    At this moment I have encountered with a problem with confirmation window.

    I click on "Save" button after that a confirmation window(with OK and Cancel buttons) appears. Depend on situation after pressing on OK button appears another confirmation window(with OK and Cancel buttons).
    Tha question is How I can describe on JScript or in another language the second window and pressing on buttons.
    For first window I using "...PressWithWarn("OK");"

    Thanks in advance

  2. #2

    Re: How to check a double confirmation windows


    Just obtain this window and simulate a click on its OK button (see the "Waiting for a Process or Window Activation" and "Simulating User Actions" help topics). What exact problem do you have with this?
    Jared - AQA Support

  3. #3

    Re: How to check a double confirmation windows


    I tried to do this without recording some actions. I wrote my own script.

  4. #4

    Re: How to check a double confirmation windows


    You already have function to click "OK" or "Cancel" button in a single window.Lets say alertclick("OK").

    As per my idea it should be as follows.

    function alerttclick(button)
    pageObj = Sys.Process("iexplore")
    alertWin = pageObj .Window("#32770", "*")
    alertWin.Window("Button", button, 1).Click()

    In this function you can add if condition , so that it will again check for confirmation window and clicks the button you said.Also use "WaitObject" method as mentioned below.
    <font color="blue"> //button1,button2 are Buttons to be clicked on first and second confirmation window respectively </font>
    function alerttclick(button1,button2)
    pageObj = Sys.Process("iexplore")
    alertWinone = pageObj .WaitWindow("#32770", "*",100) <font color="blue"> //This will wait for your alertwindow for 100 ms </font>
    alertWinone.Window("Button", button1, 1).Click()
    <font color="blue"> //Now checks for second window </font>
    alertWintwo = pageObj .WaitWindow("#32770", "*",100)
    if (alertWintwo.Exists)
    alertWintwo.Window("Button", button2, 1).Click()

    Now you can call this function:
    <font color="red">alerttclick("OK","OK")
    alerttclick("OK","Cancel") </font>and so on. It will click the mentioned buttons.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 06:03 PM.

Copyright BetaSoft Inc.