Yet another Bug in Google Suggest!

Recently I was talking about practicing testing using applications from some reputed software vendors like Microsoft, Google, Yahoo, Mozilla etc. And how finding a bug or two in such softwares could boost one’s confidence as a tester. Nothing helps you better in improving your testing skills than doing some real testing. And being able to find a couple of bugs in a software always helps!

This time I am back with yet another bug and it is in Google Suggest. I am saying “yet another” because, I claim to have caught few bugs in some reputed softwares like
Yahoo Mail BETA, IE7 and Mozilla Firefox2, and Google Suggest! For those who are not aware of Google Suggest yet, here is a little intro from their FAQ list!

"As you type into the search box, Google Suggest guesses what you're typing and offers suggestions in real time. This is similar to Google's "Did you mean?" feature that offers alternative spellings for your query after you search, except that it works in real time. For example, if you type "bass," Google Suggest might offer a list of refinements that include "bass fishing" or "bass guitar." Similarly, if you type in only part of a word, like "prog," Google Suggest might offer you refinements like "programming," "programming languages," "progesterone," or "progressive." You can choose one by scrolling up or down the list with the arrow keys or mouse."

Sounds interesting! Isn’t it? Google does this by the use of
AJAX. Google Suggest is indeed a cool feature to use and I use it regularly for quite some time now.

Today I was trying to test Google Suggest with some funny combinations of keywords and I thought why not try “google” as a keyword!

Bug Description:
Trying to search “google” in Google Suggest leads to a script error!

Steps to reproduce:
1. Open IE 7.
2. Open Google Suggest by clicking this
3. Enter keyword as “google” (without quotes) in the search box and hit [could be reproduced by clicking on “Google Search” button too]
4. Oops!

Actual Result:
Be greeted with an unusual script error from Google! [Unusual because very few lucky people get the chance to see errors on Google, unless you work for them! :)] What? Didn’t get any error in your machine! Well, look at the left corner of your status bar (i.e. the bottom left corner of your browser). You should see an “Error on page” message next to an error icon. Double click on it. Internet Explorer Script Error box should appear displaying the following message.

Line: 16
Char: 440
Error: Function expected
Code: 0

Screenshot: For a screenshot of the bug click here. Allow the page to load completely. Then click anywhere on the image for a ZOOM version!

Note: I am not sure if this error happens only with Internet Explorer. I could not reproduce this in FireFox2 and Opera though.

Looks like Google Suggest is having trouble with certain keywords. I found that using “opera” as keyword is also resulting in a similar script error! If there are 2, there must be more. I would try to get more such naughty keywords and update them here. In the mean while, why don’t you try to exercise your own testing muscles and get some too!

Happy Testing…
Share on Google Plus

About Debasis Pradhan

Debasis has over a decade worth of exclusive experience in the field of Software Quality Assurance, Software Development and Testing. He writes here to share some of his interesting experiences with fellow testers.


  1. I found that content given on your blog is read-only.
    Can you plz help me out to make my pages on blogger as read-only....

    Thx in advance

  2. @ Anugrah,

    Did you mean how to make the content copy-protected? Well, I have sent you the java script code through mail. Hope that helps.


  3. Hi Debasis,

    Greetings. I'm Arvind working as a QA Engg at Noida. I came across your blog which reinstated my interest for long. I always liked to experiment new things. And I could find a lot of interesting topics in your blog. Nice one...keep it up. I never did blog nor have the habit of doing so. But after visiting your blog; plus my interest to have a home page for myself, I have created one for myself. I'm still in alpha stage of populating related topics on my blog. Please key in your suggestions.

    I have been using G Suggest since long. I fished out this bug a couple of months ago. I took it 4 granted that it was a problem peeping out of my machine and didn't pay much attnetion to it. I stopped using G Suggest and relied back on the normal search. Only after reading your post here I realized it was a potential bug in Google. Thnx for throwing light.

  4. @ Ram Arvind Kotaru,

    I am glad to hear that you could find a lot of interesting topics in my blog. And that you have created a blog after visiting mine. All the Best and happy blogging. :)

    I was just visiting your blog and as you said it looks in its alpha phase! I will check back again in a short while. In the mean time try to post some interesting posts that could help me becoming a regular reader of your blog. :) Cheers!


  5. Thnx Pradhan. Though we share the same profession, I'd not like to make my blog a whole & sole TESTING REPOSITORY. I shall include a few testing topics but it would rather prominently be a personal blog open to all. Yeah, shall definitely try to post something that could retain your interest... :)

  6. Thanks for informative writing for tester community


  7. Hi,
    awesome !!!!!!!!!!!!
    It's been great learning from your blog.keep posting such great information.Can you suggest some special key commbiantions to bring out the crashes and we must discuss some standards which web site must have,while going for testing a that we can set some good standards.
    Thanks & Regards

    You rock dude.

  8. Can u try this scenario and just wehther its correct or not.
    1. Open google home page.
    2. in search box enter value as 120_220+320
    3. check the result.
    4. again go back to home page.
    5. this time enter value as 120_220+320_430
    6. check the result.

    i just want to know whether it displaying correct calculations or wrong?

  9. @ ShashiPalReddy,

    I have tried your above test scenario both in Google as well as in Google Suggest and I don't see anything wrong with the results! Let me explain why:

    Example 1.
    120_220+320 results in: 120 540

    Google Calculator considers the UNDERSCORE as a separator. Hence it evaluates the above equation as "120 [SPACE] (220+320)", which obviously results in: 120 540

    Example 2.
    120_220+320_430 results in: 440 650

    Going by my above logic, here the Google Calculator interprets this equation as "(120+320) [SPACE] (220+430)", and hence the result!

    NOTE: Notice how Google calculator interprets 120_220+320 as 120_220+0_320!!!

    Hope now it is clear enough why the results are like this. In case, you have still any doubts feel free to Comment back.

    Happy Testing...

  10. Hi..
    Nice explanation.
    So u r saying its taking underscore as space.
    Ok.. I'm also agreeing with u.
    But unfortunately above same scenario is not working when I enter these values.
    check this and may I know reason.


  11. @ ShashiPalReddy,

    This time instead of giving you a direct analysis I would like to give you some hints to the answer. Hope you would appreciate the little testing exercise.

    Try the following inputs in Google search box:

    1. 20_40+20_30 (your original test data)
    2. 20_40+20_300
    3. 20_400+20_30
    4. 20_400+20_300
    5. 200_40+20_30
    6. 20_40+200_30
    7. 200_40+200_30
    8. 200_40+200_300
    9. 200_400+200_30
    10. 200_400+200_3000
    11. 200_4000+200_300
    12. 200_4000+200_3000

    Did you notice any pattern in the output? :) Let me hear your analysis from the output.

    Happy Testing...

  12. Hi...

    I tested with all above test data.
    Almost for all its not displaying calculation results except 4th scenario.

    For 4th scnr its displaying correct calculation result as per our previous discussion.

    can u clarify my doubts.
    --> I know we can use that search field as calculator.
    --> I want to know whats the format required for calculation.(when user enter values with under score)
    -->why its working fine for 4th scnr.
    --> and why its not working for 7th scnr.
    -->why its not displaying result when enter 2digits_2 digits+2digits_2 digits format.. or 4 digits.

    i hope u close this discussion by clarifying my all doubts....

    I dont want waste ur valuable time for this small issue.

  13. @ShashiPalReddy,

    Actually I was expecting the answer from you. Anyway, here is what I feel about the behavior.

    As we can clearly see Google Calculator does not have a separate URL from Google. Google seems to analyze and differentiate the search queries before processing them, and if it feels that it could be a mathematical equation, then it displays the solution via Calculator. But the interesting point to note here is that even if Google returns a result via it's Calculator interface, nothing much changes URL-wise.

    e.g. Try searching for "45+55" and "a+b". In case of "45+55" the the Calculator is activated and the URL turns to ( In case of "a+b" the search engine is activated and the URL turns to ( If you look closely into the 2 URLs you would notice that they pass the search queries in a very similar way and yet the results are displayed differently (in one case the Calculator is turned ON, and in the other the Search Result Page)!

    Now, coming back to out previous little experiment involving UNDERSCORE, I conjecture that since UNDERSCORE is not a mandatory operator in any kind of mathematical computation, hence Google kind of ignores it in places where it feels the search request (input) was not meant for calculation, rather was for search! You might ask me, then why does it consider inputs like 20_400+20_300 and 300_400+400_500 for calculation? An honest answer is I am not quite sure! But I can see at least 2 reasons why this might be happening:

    1. Either there are not sufficient search results for queries like these and hence Google switches it's Calculator ON thus displaying the calculation result.

    2. Or there is some kind of boundary (in terms of digits before and after the UNDERSCORE) based on which Google is deciding to Switch ON or OFF it's Calculator module.

    At any rate, I would imagine since UNDERSCORE is not a valid mathematical operator [well, not in my knowledge! You can see more of Google Calculator's valid syntax/inputs here] that is why Google is deciding to ignore inputs involving such character in most of the cases!


  14. This seems to be hapenning only on IE. I guess its not a bug with Google, but a defect with IE


NOTE: Comments posted on Software Testing Tricks are moderated and will be approved only if they are on-topic. Please avoid comments with spammy URLs. Having trouble leaving comments? Contact Me!