Playing Back a WebDriver script in Firefox 4 behaves weirdly

Well there are some issues with Firefox 4. So I had a script created to search some key words on Google.  I tried playing it back and I find it failing. Not so impressive !
So my script looked something like
public void someGoogleSearchFor(String searchKey) throws Exception {
        browser.get("http://www.google.com");
        browser.findElement(By.name("q")).sendKeys(searchKey);
        browser.findElement(By.name("btnG")).submit();
        browser.findElements(By.linkText(searchKey)).get(0).click();
    }

I played it back in Firefox 4 and to my surprise I found the script failing on the last line
browser.findElements(By.linkText(searchKey)).get(0).click();
So when I watched the script playing back again, I notice that instead of putting the search text in the “textbox”, it just appended the text in the URL and failed on the last line of the code where it has to click the search result which contains this text.
When I played it back in IE, it works absolutely fine. This issue happens just with Firefox 4. Posted the same in Selenium community, let’s see if someone else is also facing this issue with playing back webdriver script on Firefox 4.0.1.
Pointing the post in Selenium group.

Comments

Popular posts from this blog

The 3 qualities that will always help you become better at almost anything…

Embracing the Journey: Finding Joy in the Process

How to install Android Emulator on Windows