SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Mar 2001
    Location
    Pune,Maharashtra,India
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Related to Task bar

    User kavita (kavita@prabodhan.com.nospam) posted:

    I want to know how to keep a check on the number of windows currently opened and visible in the task bar
    and how to close the undesired windows before the actual implementation of script get started. For e.g.
    Suppose I want to open the Windows NT Explorer through my script and want to check the existence of
    some file over there but if another instance of explorer is already opened then before proceeding, it should
    close the previous instance of explorer so that the chances of error should get minimized and hence the script
    created is robust one.

    Regards,
    Kavita
    ------------------------ Yahoo! Groups Sponsor ---------------------~-->
    Get VeriSign's FREE GUIDE: "Securing Your Web Site for Business." Learn about using SSL for serious online security. Click Here! http://us.click.yahoo.com/KYe3qC/I56...gFAA/dpFolB/TM

    Post message: silktest@yahoogroups.com
    Subscribe: silktest-subscribe@yahoogroups.com
    Unsubscribe: silktest-unsubscribe@yahoogroups.com
    List owner: silktest-owner@yahoogroups.com
    URL to this page: http://groups.yahoo.com/group/silktest


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Related to Task bar

    Hi,

    To get the windows currently open use,
    Desktop.GetChildren ()

    Please note that this will also return the Program Manager and the Taskbar, so you may need to parse your response before doing a count.

    To close a particular window just loop through the list generated by the GetChildren call, set the window active (.SetActive ()) and close (.Close ()).

    You could put this code in the TestcaseEnter function and it will be executed each time a testcase is run.

    I hope that this helps.

    John.

    ------------------
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  3. #3
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Related to Task bar

    Kavita,

    Use .exists for program manager, if exists use the same instance of program manager else open another one to complete your work.

    ------------------
    Sree
    Sree

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Location
    Sunyyvale CA USA
    Posts
    422
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Related to Task bar

    MikeF,

    So nice of you to have the code there. Where do u work? I am in Bay Area.

    ------------------
    Sree
    Sree

  5. #5
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Related to Task bar

    To expand on sree:

    If !(NTExplorer.Exists())
    NTExplorer.Start(NTExplorer.sCmdLine, NTExplorer.sDir)

    NTExplorer would have to be a declared window declaration for this to work with cmdLine and sDir declared within the window declaration.

    MikeF


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

  6. #6
    Senior Member
    Join Date
    Nov 2000
    Location
    Bloomington, IL
    Posts
    142
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Related to Task bar

    I am in Central Illinois

    MikeF

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

 

 

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 10:58 AM.

Copyright BetaSoft Inc.