Difference Between set_window and win_activate

set_window: specifies the window to receive subsequent input and (optionally)
specifies the amount of time to wait for the specified window.

win_activate:The win_activate function makes the specified window the active
window by bringing it into focus and raising it to the top of the display
(equivalent to clicking on the window banner). All subsequent input is submitted
to this window.

This is the explanation provided by Mercury.

But the main difference is that set_window is a native winrunner function and
win_activate is WIN32 API .

Showing Answers 1 - 5 of 5 Answers

Raja

  • Aug 19th, 2005
 

Set _window is used to set a particular window, where if we want to work with the window that window has to be changed from reset state to set state. 
 
Win_active is used like a window is already opened to activate the windowwhich is on the status bar for example. 

  Was this answer useful?  Yes

Sam

  • Aug 19th, 2005
 

read both the functions in user manual & u'll get the diff..... 
Lets suppose 2 windows are already open. 
win_active only makes the current window active (Note the word ALREADY). 
 
However, if i open anopther window or perform some action in my current window due to which the window name changes, i'll use set_window to make 
sure that the next operations is performed only after the window if fully opened. So we have got time parameter for synchronization in set_window whereas win_active does not have a time parameter.Also set_window("XYZ", 60) issues a command to WR & tells GUI map file that 
the next object that is coming up is in XYZ window. 
So if you don't set your window first, WR won't b able to recognize the object. 

  Was this answer useful?  Yes

ratna rao

  • Feb 9th, 2007
 

Set_Window - to load the window (to open the window).win_active- to activate the window was already opened in the taskbar or inactive in the desktop.

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions