How to increase speed in Selenium?

How to send control keys in Selenium?

I am currently working on a web application and trying to send key strokes through selenium driver.

I have read different articles where it was suggested to use "sendKeys" with control keys, but I cant find any working example. Can someone please help me with this? Here is the basic code: WebDriver driver = new FirefoxDriver();. Driver.get(""); //send enter. Driver.findElement(By.id("gbqfq")).sendKeys(Keys.ENTER);
//check that element is present in the DOM. System.out.println("Element is present.");
//enter again. Driver.findElement(By.id("gbqfq")).sendKeys(Keys.ENTER);
//print out the text. System.getText()); Try using the .click() command. If you want to send an enter key then:
Driver.findElement(By.id("gbqfq")).click();

Or
Driver.findElement(By.id("gbqfq")).sendKeys(Keys.

Related Answers

How can we use the Selenium tool with HeadSpin?

Selenium is a tool that is used to automate functional testing. There are two types...

What are 5 Uses of Selenium?

Selenium is a web-automation tool that helps you to test web applications....

How can we use the Selenium tool with HeadSpin?

Selenium is a cross-browser testing automation framework w...