12-06-2010, 06:47 PM
Hi,
I wrote the following script for 'open' Dialog box in QTP 11.when user open the dialog box there is folder as well as files. I want to open only file with the help of qtp.
This is the script for above functionality.
Qtp unable to identify the difference between files and folder.It diplays message 'Folder View" evenif it selects File. (Lines in red)I tried same logic for 'Open dialog box in Microsoft excel', but i got the same result.
Pls Help me nd pls correct me if there is mistake in the script.
Thanks
Regards
Swati
I wrote the following script for 'open' Dialog box in QTP 11.when user open the dialog box there is folder as well as files. I want to open only file with the help of qtp.
This is the script for above functionality.
Qtp unable to identify the difference between files and folder.It diplays message 'Folder View" evenif it selects File. (Lines in red)I tried same logic for 'Open dialog box in Microsoft excel', but i got the same result.
Pls Help me nd pls correct me if there is mistake in the script.
Thanks
Regards
Swati
Code:
Window("WinPREP®").Dialog("Open").WinButton("Open").Click
listm=Window("WinPREP®").Dialog("Open").WinListView("SysListView32").GetRoProperty("items Count")
MsgBox listm
For i=0 to 5
Window("WinPREP®").Dialog("Open").WinListView("SysListView32").Select i
[color=#FF4500]itemname=Window("WinPREP®").Dialog("Open").WinListView("SysListView32").GetROProperty("text")
msgbox itemname[/color]
If itemname ="*.MPT" Then
Window("WinPREP®").Dialog("Open").WinButton("Open").Click
windowtlt=Window("WinPREP®").GetROProperty("text")
MsgBox windowtlt,
End If
Next