Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hWnd is not visible
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
I want to maximize explorer. When I am writing below code
Code:
hWnd = Browser("name:=.*PRS.*").GetROProperty("HWND")
Window("hwnd:=" & hWnd).Activate
window("hWnd:=" & hWnd).Maximize
I am getting error.
Object not visible Line (14):
Code:
"Window("hwnd:=" & hWnd).Activate".
in the second line
If I delete that line then error will come
The operation cannot be performed Line (14):
Code:
"Window("hWnd:=" & hWnd).Maximize".

I tried even the code below
Code:
hWnd = Browser("name:=.*PRS.*").Object.HWND
Window("hWnd:=" & hWnd).Maximize
But same error
Same code is working on other machine. Do I need to change some setting of my QTP? OR is it related to IE setting?
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Code:
'small letters
GetROProperty("hwnd")
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Ans:

Hi,

In my machine it is also showing error.but there is another way to maximize the browser which i tried and it works fine in my machine.You can Try this code below:

SystemUtil.Run "iexplore.exe", "name of your Url", , , 3
Here 3 is the mode for maximizing the browser..

Thanks
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Try This!!
It worked for me

Code:
hWnd = Browser(BrowserName).GetROProperty("hwnd")      
hWnd = Browser("hwnd:=" &hWnd).Object.hWnd                                  
Window("hwnd:=" & hWnd).Activate    
Window("hwnd:=" & hWnd).Maximize
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exist and Visible Are True When Objects Aren't There - Is there A Better Way? zunebuggy 3 3,132 04-24-2018, 02:12 PM
Last Post: Ankur
  [UFT] [WPF] DataGrid: check if vertical and horizontal scrollbars are visible robertosalemi 0 2,410 07-13-2016, 06:33 PM
Last Post: robertosalemi
  Intermitent "Object not visible" error erodpr 5 3,503 01-14-2016, 10:55 AM
Last Post: vinod123
  Object properties are not visible suresh.tata 1 2,607 02-23-2014, 03:58 PM
Last Post: supputuri
Exclamation OBJECT NOT VISIBLE ERROR bala 2 4,215 07-26-2013, 03:12 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)