Nishant Posted November 22, 2006 Share Posted November 22, 2006 "How to selecta file from file open Dialog Box, on Internet Explorer." Hi, I am using autoit-v3 to inject XML file from UI. I am Not able to do that. Please see the attach file. I am working on a web based application and using internet browser. I want to select a file. Click on Browse Button and select a file from file dialog box and click open. After click on open button from the file dialog box select file should copy on the Image 1 (Attachment) XML file box. I think u understand my query. Please Help and provide some code to do that Regards, Nishant Jain Link to comment Share on other sites More sharing options...
flyingboz Posted November 22, 2006 Share Posted November 22, 2006 I think u understand my query.I think not.Please Help and provide some code to do thatPlease provide some code of what you've tried.I can't see your attachment.In addition, a URL to the web app , or a screenshot, or something would help.Have you looked at IE.au3? Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Nishant Posted November 22, 2006 Author Share Posted November 22, 2006 I think not. Please provide some code of what you've tried. I can't see your attachment. In addition, a URL to the web app , or a screenshot, or something would help. Have you looked at IE.au3? ------------------------------ I will tell AutoItv3 Example. Open a browser with the form example, there is a Browse button. I want to click on Browse button and select a file from dialog box. After selection, File name should display on the <input type='file' name='fileExample'> control. I think u understand what I am Saying. Till now I write the following script:- #include <IE.au3> ; Open web site on Internet $oIE = _IECreate ("http://nksitetest.do") Send("{ENTER}") _IELoadWait ($oIE) ; On the web site there is a BROWSE button, ;Click on browse button $oBrowse = _IEGetObjByName ($oIE, "File") _IEAction ($oBrowse, "click") ;Select a file and return back to the site ;This code I am not able to write. Please Help ;Finally Form Submition _IEFormSubmit ($oForm) Please help me on that. I am strugling from last 1 day. If any thing elase require then Please let me know. Thanks, Nishant Link to comment Share on other sites More sharing options...
flyingboz Posted November 22, 2006 Share Posted November 22, 2006 I suspect that you need to locate the dialog box window and use Send() or ControlSend() to populate the box and click on the button. pseudo code: wait for winexists "Choose File" send ("x:\directory\structure\filename.toupload.text") send {enter} I wouldn't mess w/ navigating around the internals of the control, altho people who know the gui functions might be able to point you in the right direction.. You (obviously) know the file you want to send, just put the characters in the box... Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Nishant Posted November 22, 2006 Author Share Posted November 22, 2006 Thanks for your help. But I am not very comfortable with scripting. Can u Plese correct functions for that, so that I will contd with my task. Thanks in advance for your reply. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now