How do you send enter/tab keys in webdriver?



How do you send enter/tab keys in webdriver?..

Answer / Devesh Shankar Pandya

To send the Enter key using Selenium WebDriver, use `driver.findElement(By.<locator>).sendKeys(Keys.ENTER);` To send the Tab key, use `driver.findElement(By.<locator>).sendKeys(Keys.TAB);`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

What is exception test in selenium?

1 Answers  


How can we deal with pop-up windows based on?

1 Answers  


How to do file upload in selenium?

1 Answers  


What is the difference between verify and assert commands?

1 Answers  


Tell us what are the two modes of views in selenium ide?

1 Answers  


Explain how you will login into any site if it is showing any authentication popup for username and password?

1 Answers  


How to handle dropdowns in selenium?

1 Answers  


Can WebDriver test mobile applications?

1 Answers  


What is the selenium ide and what is it used for?

1 Answers  


How can we launch different browsers in selenium webdriver?

1 Answers  


Describe the purpose of xpath.

1 Answers  


Do you know how to debug the tests in selenium ide?

1 Answers  


Categories