import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
public class select_with_control_key {
public static void main(String[] args) {
WebDriver d=new FirefoxDriver();
d.get("http://toolsqa.com/automation-practice-form/");
Actions actions = new Actions(d);
actions.keyDown(Keys.CONTROL)
.click(d.findElement(By.xpath("//option[text()='Wait Commands']")))
.click(d.findElement(By.xpath("//option[text()='Navigation Commands']")))
.keyUp(Keys.CONTROL)
.build()
.perform();
}
}