SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    sam
    sam is offline
    Junior Member
    Join Date
    Apr 2000
    Location
    San Jose, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Java applet script always fails ONLY on first run

    When testing a java applet in Netscape 4.* on any Win platform:

    The first step in the GUI is to make a selection in a TreeView. I always get an error on the first running of the script, but can always get success on subsequent runs if I manually click anywhere on the java applet. This trick does not work if I click the applet before the first running of the script.
    I don't think it's a tagging problem. Just in case, though, the declarations are provided. I have tried using the LookUnder class for the custom window but no luck. My Javaex.ini does have the JSplitPane added at the end.
    I have tried making a selection in the tree as the very first thing but it doesn't help. I have tried all kinds of SetActive combinations but it doesn't make any difference. I think that nothing in the gui is seen until the window is manually set active. This, of course, makes automation difficult.

    Thanks for any ideas

    THE ERROR:
    With agent calls switched on:
    [ ] WebzillaMainWin.Tree.DocumentTree.GetItemCount () tag="/[JavaMainWin]Webzilla - */[javax.swing.JSplitPane]#1|$tree|$0/[JavaJFCTreeView]#1|^Webzilla - *"
    [ ] *** Error: Window '[javax.swing.JSplitPane]$0' was not found

    THE WORKAROUND:
    When I click anywhere in the applet and run the script again:
    [ ] WebzillaMainWin.GetCaption () tag="/[JavaMainWin]Webzilla - *"
    [ ] WebzillaMainWin.Tree.DocumentTree.GetItemCount () tag="/[JavaMainWin]Webzilla - */[javax.swing.JSplitPane]#1|$tree|$0/[JavaJFCTreeView]#1|^Webzilla - *"
    [ ] 7

    Declarations:
    [-] window JavaMainWin WebzillaMainWin
    [ ] tag "Webzilla - *"
    [-] CustomWin Tree
    [-] msw multitag "[javax.swing.JSplitPane]#1|$tree|$0"
    [ ] //JavaxSwingJSplitPane Tree
    [ ] // The next two buttons are on the vertical member of the split pane
    [-] JavaJFCPushButton JavaxSwingPlafBasicBasicSp1 //
    [ ] tag "#1"
    [-] JavaJFCPushButton JavaxSwingPlafBasicBasicSp2 //
    [ ] tag "#2"
    [-] JavaJFCTreeView DocumentTree //
    [ ] msw multitag "[JavaJFCTreeView]#1|^Webzilla - *"


  2. #2
    Junior Member
    Join Date
    Feb 2002
    Location
    sanjose, CA, USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Java applet script always fails ONLY on first run

    Hi,

    I experience exactly the same problem with my tests on browser's applet.
    The first time the script is run, silktest cannot find the applets elements and give a sweet :
    *** Error: Window '[aa2.ab.ABPane]#1' was not found

    I also tried to do some 'sleep while exist!=true', but it didn't give me any result.

    The only solution is to browse to the applet and to launch the script twice, as it always fails the first time.

    Any idea ?

    (bellow is my browser declaration).


    [-] window BrowserChild Home
    [ ] tag "#1"
    [ ] parent Browser
    [-] BrowserChild BrowserChild2
    [ ] tag "#2"
    [-] BrowserChild BrowserChild1
    [ ] tag "#1"
    [-] BrowserChild BrowserChild1
    [ ] tag "#1"
    [-] JavaApplet Panel1
    [ ] tag "#1"
    [-] CustomWin Panel3
    [ ] msw tag "[aa2.ab.ABPane]#1"


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

  3. #3
    sam
    sam is offline
    Junior Member
    Join Date
    Apr 2000
    Location
    San Jose, CA, USA
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Java applet script always fails ONLY on first run

    Boy, you went way back. We abandoned Silktest long ago because of problems like this. With Mercury Interactive, you at least get somebody to answer the phone when you try to get tech support.

    Sorry I can't give you a workaround.

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

  4. #4
    Senior Member
    Join Date
    Jan 2002
    Location
    Des Moines, Iowa
    Posts
    289
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Java applet script always fails ONLY on first run

    Here is how to deal with that. First check to see if the applet that you launched is there with an exists method. Once it is there. Set the desktop active then set the applet active. I call this "Priming the applet". This has nothing to do with silk but everything to do with how Java Applets are seen by the system. The applet controls do not exist in the system until the Applet has received its first action. This is not a problem for "Real" users because they see the applet and can interact with it before it really exists in the system. Once a user interacts with it by using a control the Applet controls are registered to the system. Silk can't see it if it does not exist in the system.

    So the desk top Active and then the applet. Now silk will see the applet.

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


    [This message has been edited by blacst (edited 02-22-2002).]

  5. #5
    Junior Member
    Join Date
    Feb 2002
    Location
    sanjose, CA, USA
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Java applet script always fails ONLY on first run

    Humm... Could you be more clear ?
    My applet is running in a browser, not on the desktop...
    The Desktop class doesn't have a SetActive() function, same thing for the JavaApplet class...
    I tried to set the Browser active first, but I have the same result, the Java is still not found the first time...

    Well, I seem so close, could you give me a simple sample code ?
    Thanks

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

 

 

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 08:55 PM.

Copyright BetaSoft Inc.