I have a webdriver script which searches for a text in Google and
clicks on the first link.
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();
}
While playing back in Firefox, it just appends the "searchkey" to the
URL address bar and waits for some time before it fails on the last
step.
OS: Windows 7
Browser: Firefox 4.0.1
When I played it back in IE, it works absolutely fine.
Would appreciate if someone would let me know how to fix it or if
there someone has already faced it.
Thanks,
Nishant Verma
www.nishantverma.com