SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Apr 2003
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SilkBean TypeKey (\"Enter \") not working

    I'm using the following code segment to process a command line argument to a Java Application on Solaris. Everything works as planned, the command line pops up, the command text is seeded, but the Enter/Return key is never executed. Tried Desktop.typekeys("<Enter>"), and typekeys(chr((113)) but nothing seems to work.

    Has anyone ever see this problem, or can some verify this works on their Java application.

    Thanks.



    cmdLineEnter(String sCmd)
    Viewer.SetActive ()
    Viewer.ToolBar.NewWindow.Click ()
    //Esc used to prevent errs from any previously left-open PopUps
    Viewer.SessionWindow.TypeKeys ("<Esc>")
    Viewer.SetActive ()
    // Pop up the command line with the spase key
    Viewer.TypeKeys (" ")
    Viewer.JavaDialogBox("Waveform Viewer Command Line").SetActive ()
    Viewer.JavaDialogBox("Waveform Viewer Command Line").JavaJFCTextField("#1").SetText (sCmd)
    Viewer.JavaDialogBox("Waveform Viewer Command Line").TypeKeys ("<Enter>")
    //Desktop.TypeKeys ("<Enter>")


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

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

    Re: SilkBean TypeKey (\"Enter \") not working

    Let it eventually fail- what is the error?
    Most likley it thinks something something not exposed or active-
    You can try sending the typekeys to the textfield:

    Viewer.JavaDialogBox("Waveform Viewer Command Line").JavaJFCTextField("#1").TypeKeys ("<Enter>")

    Anthony

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

  3. #3
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SilkBean TypeKey (\"Enter \") not working

    1. Change the SetText(sCmd) to a TypeKeys(sCmd). Does it still work or is the command text also not applied?

    2. Print(Desktop.GetActive()) to view what Silk sees as "on top". Chances are good that it may not be what you've coded with the TypeKeys(Enter). If so, recode your command sequence to match it.

    3. I've never found TypeKeys() to be target-specific - Viewer.TypeKeys() should be just as effective as Viewer.blah.blah.blah.TypeKeys().

    Solaris isn't my area of expertise. Since Java is op-system insensitive can you run the app on a Windows system and reproduce the error there?

    John


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


    [This message has been edited by John J. Miller (edited 04-30-2003).]

  4. #4
    Junior Member
    Join Date
    Apr 2003
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SilkBean TypeKey (\"Enter \") not working

    Anthony and John,

    Thanks for your suggestions.

    Print(Desktop.GetActive()) returns the window name NameAreaWindowPU.
    I have tried Viewer.NameAreaWindowPU.typeKeys(), and many other possible permutations
    and the Enter key will not execute, any other key will execute.

    What is odd is that the command prompt is interacting with the popup even with
    what appears to be the wrong window name. Possibly the tag #1 is resolving even
    thought the window identifier is different.

    I inherited this test project and I may need to do new or better window definitions.
    Seems that SilkTest on Windows can resolve window ambiguity better than the SilkBean.

    So, just to be clear, are either of you guys actually executing the enter command via
    a Java application?


    Thanks,

    Tim


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

  5. #5
    Junior Member
    Join Date
    Apr 2003
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SilkBean TypeKey (\"Enter \") not working

    Hi John,

    Thanks again for your time.

    I looked back at my original posting and noticed that I failed to mention the test case works flawlessly the windows platforms.

    Sorry for not being as explicit with my comments as I should be, but yes, I did try NameAreaWindowPU.TypeKeys().
    Also, Print(Desktop.GetActive()) is placed immediately before and after the window.TypeKey("<Enter>") command, where window is the name returned by GetActive().

    Additionally, I re-captured the window definition with SilkTest on windows, and re-tried the above with the new definition for the same result.

    I have a case open with Segue Tech Support and they have not been able to resolve the problem. I've gotten better support from this QA Forum so far. Segue wants me to send them the application so they can see first hand. Maybe that's my next step.

    Regards,

    Tim

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

  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SilkBean TypeKey (\"Enter \") not working

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Tim Carrier:
    Print(Desktop.GetActive()) returns the window name NameAreaWindowPU.
    I have tried Viewer.NameAreaWindowPU.typeKeys(), and many other possible permutations
    and the Enter key will not execute, any other key will execute.
    <HR></BLOCKQUOTE>

    Since there's not way of knowing for sure from the above, did you try NameAreaWindowPU.TypeKeys() ?

    Rationale: If the Print(Desktop.GetActive()) was placed right after the command text appeared in the window, and just before the TypeKeys(Enter) was attempted, then the window on top - NameAreaWindowPU - is the one that MUST receive the typekeys command for the Enter to be accepted.

    All window.window syntax (and their underlying tags) can be viewed as if they are folders in a directory structure. Since Desktop.GetActive() returned NameAreaWindowPU as a ROOT window, and NOT Viewer.NameAreaWindowPU, then calls to the latter will (likely) be ignored. You are essentially IN the wrong folder and therefor talking to the wrong window.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    What is odd is that the command prompt is interacting with the popup even with
    what appears to be the wrong window name. Possibly the tag #1 is resolving even
    thought the window identifier is different.

    I inherited this test project and I may need to do new or better window definitions.
    <HR></BLOCKQUOTE>

    If the declaration tags are predominantly filled with "#1" or asterisks then Silk will blindly react with almost anything it sees. "#1" tags tell Silk to "use the first instance of the indicated class" that it finds. So a MyMainWin("#1").MyDialogBox("#1").TypeKeys(Enter) call would press the Enter key in the first JavaDialogBox in the first JavaMainWin it finds, no matter what they are.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    So, just to be clear, are either of you guys actually executing the enter command via a Java application?
    <HR></BLOCKQUOTE>

    I've used it extensively in various Java applications for a long time under Windows, but NOT on Solaris (that should not matter). As mentioned in an earlier post, Typekeys methods are acknowledged and processed by the root receiving window; it doesn't matter which of the window's child dialogs happen to be on top. But it does matter a great deal that you identify the proper window with the appropriate tags.


    John


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

  7. #7
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: SilkBean TypeKey (\"Enter \") not working

    Tim,

    One clarification on the Windows platform verification... Did you do this with the bean or the agent? The agent has some behavior differences than the bean. Since the bean is a Java interface, it will work on the Windows platform just as it does on Solaris. Try doing this with two Win machines. From Win A, connect to the bean on Win B and run this same test. Get the agent clear out of the picture. My suspicion is that you will see the same failure in this scenario.

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

 

 

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 07:32 AM.

Copyright BetaSoft Inc.