Hi all, I have a function that can highlight and bring the browser window to the front, but every time I runs it the test result will show failed and states that the object is not visible, while the browser did brought to the front and the Test were not interrupted. Any idea how to work around it, like make the failed message ignored for particular function?
Below is the code I used:
hWnd = Object.GetROProperty("hwnd")
On Error Resume Next
Window("hwnd:=" & hWnd).Activate
If Err.Number <> 0 Then
Window("hwnd:=" & Browser("hwnd:=" & hWnd).Object.hWnd).Activate
On Error Goto 0
before using the .Activate, it still have the error appearing, and when I use ObjectSpy the browser is in repository and it is appearing during test as well. I will use the trick in first reply as work around for this, until there is better solution to fix the error message. Thanks all.