SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GetActive( ) problem

    Hi there,

    my research in this forum about the following problem led to no result:

    I'm testing a C/S app (Win NT, ST 5.5.3) which is started by my script using a line command from within a DOS window named DOSBOX; this opens MainWin A and from there the script navigates to MainWin B, with A still in the background. Altogether there are 3 windows now (DOSBOX in the back, A in the middle, B in front).

    Next I use one of B's menu commands which should get the AUT back to window A (B remains open), which works fine when I perform it manually - but when the script picks this same menu item, it also ends up with A before B, but the DOSBOX standing in the foreground even before A! To be more exact: After picking the menu item I use a Desktop.GetActive() in order to check that A has appeared in the foreground, but with the behaviour I've just described, GetActive() returns "DOSBOX". (When I say that the menu item works fine "manually" then I cannot exclude that in this case DOSBOX also appears for a very short moment before A comes up because it happens much too fast.)

    Any ideas what's happening and how this can be overcome?

    Thanks a lot,
    cb

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

    Re: GetActive( ) problem

    I've seen this occasionally in Java applications.

    The key to reproducing it manually can be a bit tangled because it involves changing task focus using a variety of methods in order to prove that DOSBOX can interfere with the use of window A.

    Try combinations of the following: Invoke A from B as you've indicated above, then use either Alt-Tab (manually) to bring A into focus; OR Alt-tab to another application, then return to A using its Tasksbar icon. If DOSBOX appears in front of A at any point, you have a legitimate problem especially if A can be completely hidden underneath DOSBOX. A then can appear to be completely inaccessible to the user.


    John


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


    [This message has been edited by John J. Miller (edited 10-16-2002).]

  3. #3
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetActive( ) problem

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by John J. Miller:
    The key to reproducing it manually can be a bit tangled because it involves changing task focus using a variety of methods in order to prove that DOSBOX can interfere with the use of window A.
    <HR></BLOCKQUOTE>

    John - thank you for replying. If I understand you correctly then I'm not dealing with a scripting or SilkTest problem but with a "feature" of the AUT. This already is a very helpful insight - correct me please if I got you wrong here.

    Unfortunately your suggestions about how to reproduce it manually won't work because window A & B belong to the same task so there is no way of switching between these 2 windows using Alt+Tab or the Taskbar.

    This means I have two possibilities:
    (1) Reproduce DOSBOX behaviour manually. Anybody having further ideas how to do so?
    (2) Finding a workaround for the script when picking the "go to window A" menu item. Sleep() was of no use. Again: Any ideas?

    Best,
    cb

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

    Re: GetActive( ) problem

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by drcbrandes:
    ...This already is a very helpful insight - correct me please if I got you wrong here.
    <HR></BLOCKQUOTE>You got it.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>
    Unfortunately your suggestions about how to reproduce it manually won't work because window A & B belong to the same task so there is no way of switching between these 2 windows using Alt+Tab or the Taskbar.
    <HR></BLOCKQUOTE>

    Use Ctrl-Tab instead to move between the two open windows and dialog of your single task. You will also want to introduce a second application such as Notepad, into this scenario. Experiment a bit with moving input focus between DOSBOX, windows A, B (at various points in their invocation sequence) and Notepad using combinations of Alt-Tab, Ctrl-Tab and Task Bar icon clicks. As I said, it can be a bit tedious to find the right combination. The combination I'd try first is "B menu back to A", then Alt-Tab to Notepad, then click on your application's taskbar icon to see if DOSBOX appears on top.

    I'd also suggest that you temporarily comment out the Desktop.GetActive() call that checks "who's on top" and try running that way. The determination of who's on top can be affected by your application, timing and also if Silk is running in single-step debug mode.

    I'm out until the 28th, so hopefully this'll get you going.


    John


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


    [This message has been edited by John J. Miller (edited 10-16-2002).]

  5. #5
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetActive( ) problem

    Thanks a lot for your steady support, John.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR> Use Ctrl-Tab instead to move between the two open windows and dialog of your single task.
    <HR></BLOCKQUOTE>

    Maybe I'm totally blind here, but since all my windows have tabbed pagelists, Ctrl-Tab moves only within the folder tabs... This means - up to now I wasn't able to reproduce the effect manually, although I tried what you suggested, & much more.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>I'd also suggest that you temporarily comment out the Desktop.GetActive() call that checks "who's on top" and try running that way.
    <HR></BLOCKQUOTE>

    Unfortunately the test purpose here is to check which window appears when selecting a menu item like "Show window A", and thus Desktop.GetActive() to me seemed the method of choice. Did I miss one here?

    Best, cb

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

    Re: GetActive( ) problem

    I mis-spoke on the Ctrl-Tab idea. Sorry. I was thinking about something else.

    The idea of temporarily removing the Desktop.GetActive() line was to eliminate one variable to see the effect.

    Could you show us the declarations for windows A, B and DOSBOX? I don't need to see all of their contents - just their main declaration tags, and parent statements (or declared nesting).

    An abbreviated testcase fragment might also be useful to see your command format and sequence.


    John



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

  7. #7
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetActive( ) problem

    I'll try the TypeKeys() suggestion as soon as possible and if that fails, bits of window declarations & testcase will be posted here.

    Thanks for now,
    cb

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

    Re: GetActive( ) problem

    How about picking the menu item by using the typekeys method? Whenever I get this strange behavior this fixes it. You would not be using the mouse, but will be doing the same action.


    Anthony


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

  9. #9
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetActive( ) problem

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Pontoriero:
    How about picking the menu item by using the typekeys method?
    <HR></BLOCKQUOTE>

    Unfortunately this led to the same behaviour. Sorry, but thank you!

    Here's the announced code, shortened and renamed a lot. I hope nothing essential is missing. There is no parent relationship between the windows. The DOSBOX treatment was taken from forum 002635.html:



  10. #10
    Member
    Join Date
    Jan 2002
    Location
    Nuremberg, Germany
    Posts
    77
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GetActive( ) problem

    Sorry - I forgot the

    Print("Active window = {Desktop.GetActive()}")

    after the last Pick() command. Prints "wDOS" instead of "A".

 

 
Page 1 of 2 12 LastLast

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 11:03 AM.

Copyright BetaSoft Inc.