Prepare for your Next Interview
This is a discussion on Explain hwnd VBScript Code within the QTP forums, part of the Software Testing category; Please explain the following vbscript code. Answer soon. "Browser("index:=0").GetROProperty("hwnd")" Hi, I'm working in QTP9.0. Please explain "hwnd" and its use in QTP script?...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
Explain hwnd VBScript Code
Please explain the following vbscript code. Answer soon.
"Browser("index:=0").GetROProperty("hwnd")" Hi, I'm working in QTP9.0. Please explain "hwnd" and its use in QTP script? |
| Sponsored Links |
|
|||
|
Re: Explain hwnd VBScript Code
Hi Sunita,
'hwnd' is a property of an object, just like name/title. "Browser("index:=0").GetROProperty("hwnd")" This line of code will retrive the value of "hwnd" property for the Browser with index 0. (i.e. the first browser that was opened.) Using this property you can then perform actions on that particular browser. try to execute this code... Open a notepad file before executing the code. ' Get the hwnd value for the notepad into a variable. val_hwnd = Window("Notepad").GetROProperty("hwnd") msgbox val_hwnd ' Perform action on the notepad whose hwnd value matches with the captured one. SystemUtil.CloseProcessByHwnd (val_hwnd) Hope this helps you understand. Let me know if you still have any doubts. Regards, Tina Mahajan. |
| Sponsored Links |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Please explain this code | jainbrijesh | QTP | 3 | 02-25-2008 10:54 AM |
| VBScript call function *.dll .net | jporras | QTP | 2 | 02-22-2008 01:40 AM |
| Run the Vbscript File | pradeep_m | QTP | 1 | 01-15-2008 01:12 AM |
| How to run the Bath file using QTP/Vbscript | pradeep.madishetti | QTP | 1 | 01-09-2008 09:09 AM |
| VBscript tutorial 4 QTP | QuickTestMichael | QTP | 0 | 11-07-2007 08:42 AM |