Unified Functional Testing Practitioners Forum
Showing results for 
Search instead for 
Did you mean: 

QTP11 on Win7 64bit, not able to close windows object when the screen is loced

Regular Collector

QTP11 on Win7 64bit, not able to close windows object when the screen is loced

So I have a part of script like this: 


if Browser("title:=").Dialog("text:=Print").WinButton("text:=Cancel").exist(240) then
' Browser("title:=").Dialog("text:=Print").WinButton("text:=Cancel").highlight
end if


That is to close the print popup of IE 8 . 


It has worked well for a long time. 


Recently, we set up a test execution machine, and I noticed that if the screen is locked , the print popup will still be there after this script. And the next step will fail. I'm sure other object let flex are working well.


Does anyone know  whether the win object operation depends on the screen or mouse or keyboard?




And also I see when I keep the remote control of the testing machine but "Minimize" the remote control window. This step will also fail. If I maxmize the remote window, it will pass. 


And if I manaul move the print popup out of the visible screen, it will also fail. 


Do these prove that it depends on screen visibility or mouse or keybroad?


And solution for this?



A little more search, looks like the operation on windows object depends on mouse and keyboard movement, that might be the reason here. 


So any soluction for this , I only have one button here , click cancel button on the print popup. 



//Add this to "OnDomLoad" event