chandana Posted June 5, 2014 Share Posted June 5, 2014 (edited) i want fill an web form automatically by running autoit script. #include <D:\My_Files\Automation scripts\FF-mozilla\FF.au3> #include <GuiButton.au3> #include <File.au3> #include <_FF_AutoLogin.au3> ;Variable Declaration Dim $url, $formID, $formUID, $uName, $formPID, $pwd, $formSubmit $url = "file:///C:/Users/m1024193/Desktop/HTML.html" $formID = "" $formUID = "username" $uName = "admin" $formPID = "passwordt" $pwd = "Seven" $formSubmit = "ID_LOGON" _FFStart($url) If _FFConnect() Then _FF_AutoLogin("srv.iloadmin","SeR^ER@iL0", "file:///C:/Users/m1024193/Desktop/HTML.html") EndIf i have tried above code Edited June 6, 2014 by chandana Added code tags Link to comment Share on other sites More sharing options...
Danp2 Posted June 5, 2014 Share Posted June 5, 2014 Why are you calling both _FFOpenURL and _FFWindowOpen? Also _FF_AutoLogin performs a _FFOpenURL if you pass it a url. You need to provide a detailed explanation of what isn't working. Post the results from the Scite output window. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 5, 2014 Moderators Share Posted June 5, 2014 chandana,For the second time:As well as using code tags, post in the correct section of the forum. Once more I have moved the thread for you - I do not want to do it again. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
chandana Posted June 6, 2014 Author Share Posted June 6, 2014 (edited) i want fill an web form automatically by running autoit script. #include <D:\My_Files\Automation scripts\FF-mozilla\FF.au3> #include <GuiButton.au3> #include <File.au3> #include <_FF_AutoLogin.au3> ;Variable Declaration Dim $url, $formID, $formUID, $uName, $formPID, $pwd, $formSubmit $url = "file:///C:/Users/m1024193/Desktop/HTML.html" $formID = "" $formUID = "username" $uName = "admin" $formPID = "passwordt" $pwd = "Seven" $formSubmit = "ID_LOGON" _FFStart($url) If _FFConnect() Then _FF_AutoLogin("srv.iloadmin","SeR^ER@iL0", "file:///C:/Users/m1024193/Desktop/HTML.html") EndIf i have tried above code it is not filling username and password details automatically Edited June 6, 2014 by chandana Link to comment Share on other sites More sharing options...
chandana Posted June 6, 2014 Author Share Posted June 6, 2014 expandcollapse popup>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\My_Files\Automation scripts\FF-mozilla\11.au3" __FFStartProcess ==> General Error: Error reading registry entry for FireFox. HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla Firefox\*CurrentVersion*\Main\PathToExe Error from RegRead: 1 _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1 _FFConnect: AutoIt: 3.3.10.2 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 568 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 __FFSendJavaScripts: Sending functions to FireFox .......... done _FFLoadWait: . loaded in 10ms [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} _FFConnect: OS: WIN_7 WIN32_NT 7601 Service Pack 1 _FFConnect: AutoIt: 3.3.10.2 _FFConnect: FF.au3: 0.6.0.1b-10 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 576 _FFConnect: Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 __FFSendJavaScripts: Sending functions to FireFox .......... done _FFOpenURL: file:///C:/Users/m1024193/Desktop/HTML.html __FFSend: try{window.content.top.document.location.href='file:///C:/Users/m1024193/Desktop/HTML.html'}catch(e){'_FFCmd_Err';}; __FFRecv: file:///C:/Users/m1024193/Desktop/HTML.html _FFLoadWait: .. loaded in 270ms [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} __FFSend: FFau3.WCD=window.content.top.document; __FFRecv: [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} [object XrayWrapper [object HTMLDocument]] - {location: {...}, getElementsByName: function() {...}, getItems: function() {...}, open: function() {...}, close: function() {...}, write: function() {...}, writeln: function() {...}, ...} __FFSend: try{window.content.top.document.forms.length}catch(e){'_FFCmd_Err';}; __FFRecv: 0 __FFSend: FFau3.xpath=null;try{FFau3.xpath=FFau3.WCD.evaluate("count(//form[1]//input[@type='password'])",FFau3.WCD,null,XPathResult.NUMBER_TYPE,null).numberValue;}catch(e){'_FFXPath_Error: '+e;}; __FFRecv: 0 >Exit code: 0 Time: 3.121 i am getting this error.. Link to comment Share on other sites More sharing options...
Solution Danp2 Posted June 6, 2014 Solution Share Posted June 6, 2014 There are still some minor issues with you code. Here's my revised version: #include <FF.au3> #include <_FF_AutoLogin.au3> ;Variable Declaration Dim $url, $formID, $formUID, $uName, $formPID, $pwd, $formSubmit $url = "file:///C:/Users/m1024193/Desktop/HTML.html" $formID = "" $formUID = "username" $uName = "admin" $formPID = "passwordt" $pwd = "Seven" $formSubmit = "ID_LOGON" _FFStart($url) If _FFIsConnected() Then _FF_AutoLogin("srv.iloadmin","SeR^ER@iL0") EndIf I don't see any errors in the Scite output. However, it looks like there aren't any forms on this web page so it doesn't appear that _FF_AutoLogin will work properly in this instance. Latest Webdriver UDF Release Webdriver Wiki FAQs 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