LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-11-2006, 10:21 PM   #1
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403
Blog Entries: 1

Rep: Reputation: 30
Question Script to input values into firefox.


g'day,
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 ?
 
Old 10-12-2006, 08:35 AM   #2
danielftl
LQ Newbie
 
Registered: Oct 2003
Location: San Francisco
Distribution: RedHat Linux Enterprise 6
Posts: 3

Rep: Reputation: 0
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.

Daniel
 
Old 10-12-2006, 10:54 AM   #3
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403
Blog Entries: 1

Original Poster
Rep: Reputation: 30
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.
 
Old 10-12-2006, 11:02 AM   #4
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403
Blog Entries: 1

Original Poster
Rep: Reputation: 30
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.
 
Old 10-12-2006, 11:35 AM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,154

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
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.

Last edited by PTrenholme; 10-12-2006 at 11:36 AM.
 
Old 11-01-2006, 01:38 PM   #6
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403
Blog Entries: 1

Original Poster
Rep: Reputation: 30
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with shell script - fill an array with values from a file delmoras Linux - General 1 07-17-2006 12:19 PM
BASH Script: variable values referencing for console arguments sadarax Programming 1 11-14-2005 06:23 PM
MySQL Returning very strange Values in PHP Script benrose111488 Programming 2 10-21-2004 12:26 PM
send automatic input to a script called by another script in bash programming jorgecab Programming 2 04-01-2004 01:20 AM
How to change parameter values of a function in shell script? Bassam Programming 0 01-25-2004 10:52 AM


All times are GMT -5. The time now is 04:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration