Saturday, June 9, 2012

Change Address Bar Search Provider in Firefox

There are couple of thing you should know about address bar in Firefox. Not necessarily important but yes interesting.

When you type any thing in Firefox address bar it looks for url , if it is not an url then it sends this keywords to Google (By default). The is Google's “I’m Feeling Lucky” option. This “I’m Feeling Lucky” option will load the #1 rank website of the keyword(s) search result, instead of listing matching websites. In simple English if you search same keyword in www.google.com it will give you all search instead of top rank website.

Now there are two things which comes in mind.
How to get rid of   "I m Felling Lucky" Option?
How to change the search engine itself?

Let's look at the first one.
Step 1: Start Firefox
Step 2: Type about:config in address bar (Same place where you type URL)
Step 3: It may give you warning , select "I will be careful, i promise"
Step 4: Search for Keyword.URL and double click on it.
Step 5: Paste below in "Enter String Value"
            http://www.google.com.my/search?q=
Step 6: Select Ok and Your are done.

Now searching from  Firefox address bar will not use "I am feeling lucky option".


Now, how to change the search engine itself. Not every body want to search every thing on google. I uses Bing some times.

Step 1: Start Firefox
Step 2: Type about:config in address bar (Same place where you type URL)
Step 3: It may give you warning , select "I will be careful, i promise"
Step 4: Search for Keyword.URL and double click on it.
Step 5: Past below in "Enter String Value" as
           Bing :
           http://www.bing.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

          Yahoo: http://search.yahoo.com/search?p=

          Ask: http://www.ask.com/web?q=

 
 Hope this is helpful.

Use Multiple Firefox Profiles at the Same Time

This is help full in many ways. I do use this in selenium automation to run multiple test case at the same time.
If we different user cert (authentication) for different step us, if i need to check one bug on another old set up which have different user cert installed i can just start that profile and test at the same time.

Step 1: Make Sure you have created Multiple Firefox Profile. If not see the sub steps how to create multiple profile.
        Step A: Open command prompt or Press Windows + R button
        Step B: On command prompt go to C:\Program Files\Mozilla Firefox location and Run below command
                    firefox.exe -P or firefox.exe -ProfileManager
                    If using Windows + R button then type same  command in Run
                    firefox.exe -P or firefox.exe -ProfileManager  
        Step C:  Click on Create Profile
        Step D:  Click on Next and Give the Profile Name
        Step E:   Now Click on Finish... Your newly created firefox profile is ready

Step2: Open command prompt or Press Windows + R button

Step 3: If command prompt then go to C:\Program Files\Mozilla Firefox location and type below command
            firefox.exe -P -no-remote  or   firefox.exe -ProfileManager -no-remote
            If pressing Windows + R then type the same above mention command in Run
            firefox.exe -P -no-remote  or   firefox.exe -ProfileManager -no-remote

NOTE : Make sure there is no space between -no and -remote

Step 4: Now select any profile which you want to run and press  "Start Firefox" button.
            or directly type firefox.exe -P -no-remote "ProfileName"
            You have started first profile successfully now try opening another profile at the same time.

Step 5: Follow Step3 again and run the same command again

Step 6: This time select another profile and press "Start Firefox". Your are running two different profile at a time.

You can check if you are opening two different profile or not by setting up Tools -> Option -> General -> and set two different home page for two different profile.Now start you two different profile at the same time and see if both profile are opening correct home page or not.

Of course there are other way to check the open profile name.
Explore more command/option for firefox profile manager
http://kb.mozillazine.org/Command_line_arguments

Hope this post will help you.

How to Create a Hibernate Shortcut key in Windows

I don't shut down my laptop when i am done at office. I hibernate my laptop so that i can open my laptop at home and start working where i left my work or  next day start the work from same place where i left. In Windows XP to hibernate you have to do Start - > Shut Down and then select Hibernate from drop down. What if you have option like Windows + d or Windows + L (generally daily in use).

I will help you to create same kind of Short Cut key for Hibernate mode for your windows laptop or desktop.

Step 1: Right click on the desktop and select New -> Shortcut

Step 2: Type this into the location field:
C:\Windows\System32\rundll32.exe powrprof.dll,SetSuspendState 0,1,0



 Step 3: Name it whatever you would like: and Finish



Step 4 (optional): Change the icon to something meaningful. Right click on the shortcut, and select Properties. In the Shortcut tab, choose "Change Icon". You can use the default icons in there, or choose from the power icons by clicking browse, and typing this:


%SystemRoot%\System32\powrprof.dll

 Select any of icon which you like and icon for your Hibernate_Shortcut is ready.

Step 5 :  Right Click on Hibernate_ShortCut - > Properties -> Shortcut -> Short cut key
Select short cut key field and press some key example : Ctrl + h. Your selected key will be shown there.
Now click on save and you are done.

To test press Ctrl+h and your laptop or computer will go in hibernate mode.