Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem withuploading files when windows is locked
#1
Solved: 10 Years, 9 Months, 2 Weeks ago
hi all ,

i have an application in which i have upload files functionality. i automated it and it works well until windows is not locked.But if windows is locked and scripts run, QTP can not upload files and throws an error "object not found..."
not only upload dialog box but also for other dialog boxes QTP gets struck.

i goggled for the solution and i got following code snippets ,just to close a dialog box when windows is locked:

Code:
Public Const WM_COMMAND=273
Extern.Declare micLong, "PostMessage", "user32.dll", "PostMessageA", micHwnd, micLong, micLong, micLong
windowTitle = "message from browser " 'change it for different dialog box
buttonCode = 1 ' 1- OK, 2 Cancel in this dialog. It is "window id" property of the Button that you need to click - use Object Spy
Hwnd = Window("regexpwndtitle:="&windowTitle).GetRoProperty("hwnd")
lResult = extern.PostMessage(Hwnd, WM_COMMAND, buttonCode, 0)


this really helped me a lot But i got struck once again when it was a time to 'choose a file'/'type a file name' in "CHOOSE FILE TO UPLOAD" dialog box.

could any one explore his/her ideas on this issue?
Reply


Messages In This Thread
problem withuploading files when windows is locked - by caze - 12-16-2009, 03:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem in Recording .net windows application sk.aravind 8 5,347 11-20-2009, 01:13 PM
Last Post: v_selvam
Rolleyes attachment when computer is locked Usman Muzaffar 0 1,622 02-25-2009, 01:34 PM
Last Post: Usman Muzaffar

Forum Jump:


Users browsing this thread: 1 Guest(s)