Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Qtp identifies any files in 'SysviewList 32' as folder View
#1
Not Solved Question 
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

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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Executing via create "RES"xx folder? nishitd 0 1,253 03-07-2018, 01:09 AM
Last Post: nishitd
  SwfTree View Validation in UFT YogeshCallappa 0 2,140 10-28-2016, 01:26 PM
Last Post: YogeshCallappa
  code for validation to create a sub folder smiley 0 1,547 10-19-2016, 10:08 PM
Last Post: smiley
  Files comparison using QTP santosh.msr 0 2,187 07-11-2016, 11:38 AM
Last Post: santosh.msr
  [UFT] Close opened folder robertosalemi 1 3,353 02-10-2016, 07:06 PM
Last Post: robertosalemi

Forum Jump:


Users browsing this thread: 1 Guest(s)