-   Programming (
-   -   Script to input values into firefox. (

WhiskeyTangoFoxtrot 10-11-2006 09:21 PM

Script to input values into firefox.
i wanted to write a simple shell script that can open firefox and then enter a username and password into the default page it opens. this page already centers the cursor onto the username box so i jus want it to type stuff there, tab and write in the password box and then enter them.
is this possible ?

danielftl 10-12-2006 07:35 AM

Is CURL something that would work for you here? I guess it depends on what you want to do with the result of the userid and password being entered into the page. If you're trying to extract data from the result page that you can use for something else, then CURL and the shell script can do that.


WhiskeyTangoFoxtrot 10-12-2006 09:54 AM

im working on a script that autmatically connects me to the wireless in my uni using ndiswrapper. once connected i then have to open firefox and type in my username and password to log into the uni's network.

WhiskeyTangoFoxtrot 10-12-2006 10:02 AM

i checked up to see if firefox had any commands that can do this for me but it doesnt. is there any other method ? the curl thing dint show up anything usefull.

PTrenholme 10-12-2006 10:35 AM

In Firefox, when you fill out a username/password pop-up, you're normally asked if you'd like Firefox to save that information for use the next time the pop-up is displayed. (Unless you've turned off the option. If so, you can restore it in your config file. [Just enter about:config as a URL.])

After you've saved the info, all you'll need to do is click on the "O.K." (or whatever the University has chosen to use) button, which should be quick enough for you.

This is not a complete answer to your question, but it's an easy one to implement.

For a complete solution, look at the documentation about creating a Firefox extension, and write the code you want into an extension you can install in FF. Or, alternatively, look at the "GreaseMonkey" Mozillia extension, which, if installed, will let you write a Java script file to do what you want when the University pop-up is displayed.

WhiskeyTangoFoxtrot 11-01-2006 12:38 PM

thats the problem there is no popup to input the password, just a page with the text entry bars imbeded into it and the page does not allow one to save the passwords even :s

All times are GMT -5. The time now is 04:49 AM.