Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currently with the new version of googlle.com I am not able to enter the text into the google search box as it is currently disabled. Once we point out the cursor on to the google search box then only the search parameter can be entered. But how can I set focus into the search text box using Selenium web driver? #1

Open
jindal1989 opened this issue Jan 30, 2017 · 0 comments

Comments

@jindal1989
Copy link

driver.navigate().to("https://www.google.co.in/");
driver.manage().window().maximize();
WebElement searchBox = driver.findElement(By.id("gs_htif0"));
searchBox.sendKeys("Selenium WebDriver");
WebElement searchButton = driver.findElement(By.name("btnK"));
searchButton.click();

Caused by: org.openqa.selenium.InvalidElementStateException: Element is disabled and so may not be used for actions
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:32:46'
System info: host: 'Ankush-PC', ip: '192.168.1.6', os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.0', java.version: '1.7.0'
Driver info: driver.version: unknown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant