I've got this line of code:
final WebElement button = driver.findElement(By.tagName("button"));
Now, how to I click on that button with the meta key held down?
As per Madd0g, java code would look like this:
Actions shiftClick = new Actions(driver);
shiftClick.keyDown(Keys.SHIFT).click(element).keyUp(Keys.SHIFT).perform();
hmm.. I'm not exactly sure about java, but in C# this is done with the ActionBuilder --
new Actions(Browser).KeyDown(Keys.Shift).Click(element).KeyUp(Keys.Shift).Perform();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With