Monday 19 August 2013

OpenFileDialog In QTP with help of DotNetFactory

OpenFileDialog In QTP with help of DotNetFactory
Set fd = DotNetFactory.CreateInstance(“System.Windows.Forms.OpenFileDialog”, “System.Windows.Forms”)
fd.InitialDirectory=”c:\\”
fd.Filter=”txt files (*.txt)|*.txt |All files (*.*) |*.*”
fd.RestoreDirectory=true
fd.FilterIndex=2
fd.ShowDialog()
msgbox fd.FileName

No comments:

Post a Comment