![]() |
Unable to open a file using open file dialog windows vista - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Unable to open a file using open file dialog windows vista (/Thread-Unable-to-open-a-file-using-open-file-dialog-windows-vista) Pages:
1
2
|
Unable to open a file using open file dialog windows vista - umer830 - 12-16-2009 Hi Everybody, I am trying to open a file using Open file dialog in my web application with QTP. QTP doesn't record the file selction from dialog box. I used object spy and it recognized it as Dialog box. In my object repository it is inserted as a child of borwser window from this dialog popus up. Now I have used below code condition and its returning true If Browser("ProjectCentre QTP: DropBox").Dialog("Choose file").Exist Then MsgBox "The browser exists." and it TRUE. But when i try to use other methods of dialog object with below code it gives me a message saying object not visible as shown in attached screenshort below code also not working Code: Browser("ProjectCentre QTP: DropBox").Dialog("Choose file").SetTOProperty "Visible", TRUE Attached screenshort explains the story in more detail. Please suggest a wayout RE: Unable to open a file using open file dialog windows vista - upadhyay40 - 12-16-2009 Hello Umer, you need to test some setting 1. Select Tools>>Web Event Recording Configuration>>Custom Settings 2. On the left hand side, select WebFile in the Standard Web Objects branch of the Objects pane 3. Select Event>>Add>>onclick 4. Select Always in the Listen column for this event good luck Thanks Mahesh RE: Unable to open a file using open file dialog windows vista - umer830 - 12-16-2009 thanks for your reply but perhaps I could not list the complexity of problem earlier. Now I just want to enter path manually but my code clicks the associated browse button and opens the file open dialog here is more detail case1:When I Manually enter File path and let QTP click on Webbutton it works Fine case 2: If QTP Enters File path :, It does not work at all , in debug mode i.e. file path is not entered in text box ( whether replay type is mouse or browser event ) Now I have 2 Questions 1. Does QTP , support "set" method for Web file Object i.e. is it different from set method used for web edit ?? If it does It should enter the text in web file text box always but this does not happen 2. What does it treat web file object, as whether a webedit or webbutton ? How to enter path using any of the moethods of webfile object RE: Unable to open a file using open file dialog windows vista - umer830 - 12-17-2009 any response for above problem ![]() RE: Unable to open a file using open file dialog windows vista - Saket - 12-17-2009 I am confused, is this a webfile control or open file dialog? paste the snapshot if this is a open file dialog, have you tried below Code: Browser("ProjectCentre QTP: DropBox").Dialog("Choose file").WinEdit("").Set Your File RE: Unable to open a file using open file dialog windows vista - umer830 - 12-18-2009 Here I am making my issue more simpler I have a main browser window which has a webfile control as shown in attached screen short named browse.jpg. Initially i was trying to automate this way as mentioned below 1-click borse button ( QTP recording it fine) 2- Open file diaplog displayed ( QTP unable to record file slection operation on this window So descided to skip browse button on the main window and open and set path is associated edit box in webfile control. But webfile.set method didn't worked for me .It is neither getting failed nor setting path strange it is ![]() After failing in above I thought to write file name in file name box of file open dialog highlighted in blue which worked fine with code statement '''Browser("ProjectCentre QTP: DropBox").Dialog("Choose file").WinEdit("").Set Your File '' But when I click open button to select file it gives me error 'object not visible' as shown in man screenshort of my post. I have tried it to get object at run time and using child object method on this file open dialog but nothing working for me right now stuck in both places 1- setting path in webfile and 2- sing opne file dialog I hope I have lited all required details RE: Unable to open a file using open file dialog windows vista - sreekanth chilam - 12-18-2009 Hi, Fyi, We too have faced this issues( SAP-Windows level Objects) and we resolved it with below workaround. Perform "Low-level recording" for Entering the file path & cliking "Open" RE: Unable to open a file using open file dialog windows vista - umer830 - 12-18-2009 ahhhhhhhhhhhhhhhhh There must be a way out . Low level recording I always scared of RE: Unable to open a file using open file dialog windows vista - sreekanth chilam - 12-18-2009 Hi Umer, I didn't get the meaning of your word "ahhhhhhhhhhhhhhhhh". Fyi, we are doing SAP Automation testing using QTP 9.5, in some cases in SAP we have to do some operations on windows objects such as Opening the files located in our pc, attaching a files from our pc to SAP system. we were facing the object identification issues in doing the same, infact QTP was getting hanged & crashed when we tried to record or ADD the windows objects into Obj.Rep. Fyi, with regard to the above issue, we raised a ticket with HP support & they came back with a couple of work arounds i.e low level recording & WSH methods and it worked fine for us. Moreover, I was suggesting to try out the above work arounds and its upto you to try or not. Hope I am making sense ![]() RE: Unable to open a file using open file dialog windows vista - umer830 - 12-21-2009 FYI ![]() |