Micro Focus QTP (UFT) Forums
Question on QTP Support - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Interview Questions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Interview-Questions)
+--- Thread: Question on QTP Support (/Thread-Question-on-QTP-Support)



Question on QTP Support - karanth - 03-19-2008

Hi All,

Actually in an Interview with Amazon, he asked me one question.
I had to script the following scnario.

1) Click start->programs->Remote Desktop connection
2) Give an approp IP
3) Click ok and on the next screen , give username / password / domain
4) Assuming it logs in correctly, do some stuff in the Remote desktop
5) exit out of remote desktop

Sir/Maam, my question is does qtp support that??

Thread moved to QTP Interview Questions Forum


RE: Question on QTP Support - sreekanth - 03-19-2008

Hi Karanth,

The answer for this is you cant capture the objects in rdc.
if you try to record it will record in a analog way.


RE: Question on QTP Support - lskmuni2000 - 03-19-2008

Sreekanth is correct, we can't record rdc


RE: Question on QTP Support - FredMan - 03-25-2008

Sure you can, I do it all day every day. I have several remote virtual machines. The only requirement is QTP has to be installed on the VM.


RE: Question on QTP Support - ShravanGaddam - 04-01-2008

Hi Karanth,
Recording will generate a script that works on co-ordinates of the application. None of the objects will be captured.
This is how the script will look:
___________________________________________________________
Code:
SystemUtil.Run "mstsc","","C:\Documents and Settings\dpqasmg",""
Dialog("Remote Desktop Connection").WinButton("Connect").Click
Wait 5
Window("Remote Desktop").WinObject("Input Capture Window").Type "test123"
Window("Remote Desktop").WinObject("Input Capture Window").Type  micReturn
Wait 15
Window("Remote Desktop").WinObject("Input Capture Window").Click 9,944
Window("Remote Desktop").WinObject("Input Capture Window").Click 118,913
Window("Remote Desktop").WinObject("Input Capture Window").Click 629,421
Dialog("Remote Desktop Connection").WinButton("Close").Click
__________________________________________________________

From my experience, this is a bad way of scripting.


RE: Question on QTP Support - FredMan - 04-08-2008

What Shravan Gaddam recorded was the login to the remote desktop. I get the correct lines of code when I record in the remote desktop itself just like recording on your local desktop..

Code:
Window("Program Manager").WinListView("SysListView32").Click 897,599
Window("Program Manager").WinListView("SysListView32").Click 897, 599, micRightBtn
Window("Program Manager").WinObject("SHELLDLL_DefView").WinMenu("ContextMenu").Select "Properties"
SystemUtil.Run "C:\WINDOWS\system32\rundll32.exe","/d C:\WINDOWS\system32\shell32.dll,Control_RunDLL desk.cpl","",""
Dialog("Display Properties").WinButton("OK").Click
SystemUtil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","","C:\Documents and Settings\fred_h","open"
Browser("MSN.com").WinToolbar("ToolbarWindow32").Press "&File"
Browser("MSN.com").WinMenu("ContextMenu").Select "Close"