SPONSORS:






User Tag List

Results 1 to 8 of 8
  1. #1
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    multitag statement


    I launch my main application with the Start() method.

    It is sucessfull most of the time.
    It takes about 30 seconds for the app to launch

    However, if there is a config file not present, A Java Dialog Message Box with caption = "Information" will pop up after 2 seconds. The user must click OK
    and then the application will continue on and launch.

    How can I get the Start() method to automatically dismiss this dialog if it pops up? I tried using a multitag statement in the main window declaration:

    [-] multitag "Administrator"
    [ ] "Information"


    But this did not work.

    So the way things are now, if the Info Box comes up , the Start () waits for the 30 second timeout and fails, since the caption
    for the main window has never been found due to the fact that the information dialog is
    on the screen waiting to be dismissed.

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement

    You can make your own Start() method, and call down to the derived Start(). If you detect the Config dialog message, then OK to close it and keep going.

    In your Main Window, so something like this:

    EDIT: Added the real Start() method parameters...

    [This message has been edited by styler (edited 03-13-2001).]
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  3. #3
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement

    Define the "extra" window as normal. Then overide the invoke method for the mainwindow with a while loop. The control for the loop will be if the window exists and then sleep for some time. If you window is found, then click the OK button.

    while !InfoWin.Exists() | | MainWin.Exist()
    sleep(1)
    if InfoWin.Exists()
    InfoWin.SetActive()
    InforWin.OK.Click()


    something like that will work

    Tony

  4. #4
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement


    Thanks. I will study this code as I don't have programming experience.

    Right now, I'm getting "incorrect # of arguments to function Start()" error if I try to run the code .


    Also , is there any way of simply launching an
    .exe and return immediately without looking for any window?

  5. #5
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement

    The Start() method typically takes a string parameter, sCmdLine, which starts your application.
    Tom

  6. #6
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement

    Raul,
    In response to your last question about launching an .exe. because you app is built with Java you can't use then .exe. If you do use the .exe then you will be able to see the javaMainWin and JavaDialogBox controls but you won't be able to see any of the controls on those windows. This is a Java issue.

    Have you considered configuring the SilkTest recovery system so you can use DefaultBaseState or your own BaseState? It's not necessarily an easy or quick thing for a beginner to do on their own. But it is well worth the effort in the long run - (1) to have the recovery system configured and (2) for your learning of the powers of SilkTest.

  7. #7
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement

    Thanks. I will study the DefBaseState().

    wrt exe launching.

    I have a simple perl script apart from the main Java App I am testing. It is run from the command line.

    I want to launch it. Is Start() the easiest way of launching this perl script? I don't want it to look for any windows, as it is simply a command line script "c:\setup.pl"

  8. #8
    Senior Member
    Join Date
    Sep 2000
    Posts
    159
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: multitag statement

    I'm getting an error launching the perl
    program.

    code:

    [ ] const wMainWindow = App
    [ ]
    [-] window MainWin App
    [ ] tag "[DialogBox]C:\WINNT\System32\cmd.exe"
    [ ]
    [ ]
    [-] testcase LaunchPerl () appstate none
    [-] recording
    [ ] MainWin("").Start("c:\setup.pl")

    Result:

    Script $ScriptMain
    Testcase LaunchPerl
    MainWin("").Start ("c:\setup.pl")
    *** Error: Application cannot be started -- Error 193
    Occurred in Start

    Also, where do I look up the meaning
    of "Error 193" I could not find it in Online help.

 

 

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 12:20 AM.

Copyright BetaSoft Inc.