GeekInterview.com
Series: Subject: Topic:
Question: 2 of 465

Set_ window and Win_ activate

Explain what are set_ window and win_ activate, How do they differ?
Asked by: muraliare | Member Since Aug-2008 | Asked on: Aug 25th, 2008

View all questions by muraliare

Showing Answers 1 - 2 of 2 Answers
a_katiyar

Answered On : Aug 26th, 2008

View all answers by a_katiyar

win_activate(sWindow) : Suppose there are several windows (sWindow one of them)opened on your desktop,and you want to run your code on 'sWindow',

win_activate () function will bring this window into focus and raise it to the top of the display. Next function after win_activate() should always be set_window().

set_window(sWindow,time) : function specifies the window to recieve subsequent input. "time" specifies the amount of time to wait for the specified window(sWindow).
This function also set the scope for object identification in the GUI map.

If there are several windows opened on screen then its always better to use win_activate () followed by set_window(), but if there's only single window opened then set_window() is enough.
Note: In multiple window case, set_window() alone can work fine but using win_activate() will minimize the chances of errors if any.

If window is minimized,don't rely on set_window() as it will always return E_OK where as win_activate() will return error code.

Hope above explanation answers your query.

Regards,
-AK

Yes  1 User has rated as useful.
  
Login to rate this answer.
ferdinandstest

Answered On : Aug 24th, 2009

View all answers by ferdinandstest

Set_window (This is the fuction to focus that particular window, Examble Set_window("Login",5); Now the winrunner focus the Login window if it is opened the window will focus else you will get a error message Winrunner cant identfy),
Win_activate (This is the function to check that particular window opened or not, If it is opened no problam winrunner go to next step of the TSL Script, And If it is not opened It will show the error like Winrunner cant identfy)

If any thing is wrong plz inform me...

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.