How to Enable Auto Login To Multiple Websites On Firefox

Sandeep Agarwal

Selenium-ThumbnailIf you are someone who spends a lot of time on the internet using various web services then I am sure you have a way of saving usernames and passwords. You could be letting your browser do it or may be you are using a password manager for the purpose. But you still have to go to that website each time and click on that ‘Login’ button, no?

As you might have guessed from the title of this post, we want to kick your productivity up a notch by eliminating even the first step of manually typing in the website link and clicking on login. We will see how to enable auto login to websites – even to multiple websites at once – on Firefox, to save you some seconds each day. They do count over a period of time.

Cool Tip: Sometimes you may want to pull out your account information from the prefilled login forms of browsers. Here’s how you can do it on Chrome and Firefox.

The tool for the job is a Firefox extension called Selenium. It is a good one and used as a testing and development tool in the industry. We will try and make a simple case out of it.

The extension is somewhat like a record and play tool. All you need to do is record the login steps, save the auto generated script and play the same to log in to a website later.

Before we begin you must have Selenium integrated to the browser. Navigate to this location and download the extension. The moment you do that, Firefox will ask for your permission. Click on Allow.

Allow-Selenium

Then, a window will be shown with the list of add-ons that will be added. Click on Install.

Install-Selenium

Steps to Record Login Steps

Be careful while recording the steps. Do not click anywhere on the website interface apart from the username/password boxes and the login button.

Step 1: Open Firefox and browse to the website for which you want to create such a login script.

Step 2: Press Alt (to show the Firefox menu bar temporarily) and navigate to Tools -> Selenium IDE. Keyboard users may prefer using Ctrl + Alt + S.

Start-Selenium-IDE

Step 3: You will see the Selenium window right away. Click on the red button placed towards the top right of the interface. This will start recording browser activity.

Start-Selenium-Recording

Step 4: Get back to the tab/window on which you opened the website in Step 1. Click on the username textbox, type the username, click on the password box, type it and then click on the login button.

I tried it on my Yahoo account.

Yahoo-Login

Note: Do just the above mentioned steps. And by click I mean use the mouse. Do not use keys like Tab and Enter.

Step 5: When login is complete, get back to Selenium tool (it must be minimized with Firefox) and press the record button again (to stop recording).

Script-Generated

As you see in the image, a script will be generated – each line containing a command, a target and a value. If things have gone well the script should have only four lines.

Step 6: Press Ctrl + S to save the script. Give it an appropriate name and save it under All Files type. It should take the .html extension automatically.

Save-HTML-Script

Playing Recorded Script

Playing the recorder script is nothing but automatically logging in to a given website. Here’s what you need to do.

Step 1: Open Firefox and launch Selenium as you had done earlier. Navigate to File -> Open.

Open-Selenium-File

Step 2: Select the html file that you had saved in Step 6 above. It will load the script. Click on the green button that’s marked in the image below.

Execute-Selenium-Script

Wait for a while and you will be logged in to your website. Simple, right?

Cool Tip: You can save multiple such scripts as a suite (see File menu), save the suite and execute the suite at once. That way you can log in to multiple websites with a single click.

Conclusion

I use the tool for heavier tasks on various websites. And, it has been performing very well. I hope the process will help you too. You may find it difficult initially but with a few tries you will definitely start loving it.

Also See
#Firefox #password

Join the newsletter