Sign in to follow this  
Followers 0
chandana

How to fill web form in firefox?

6 posts in this topic

#1 ·  Posted (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 by chandana
Added code tags

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by chandana

Share this post


Link to post
Share on other sites
>"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..

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0