help me please, i have a WebDriver script:

package AdvancedInteraction;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;

public class ActionClick {
    public static void main(String[] args){
        WebDriver driver = new FirefoxDriver();
        WebElement one = driver.findElement(By.name("one"));
        WebElement three = driver.findElement(By.name("three"));
        WebElement five = driver.findElement(By.name("five"));
        // Add all the actions into the Actions builder.
        Actions builder = new Actions(driver);
        // Generate the composite action.
        Action compositeAction = builder.build();
        // Perform the composite action.

but when i execute this script it doesn't click with CONTROL button. Why does it happen ?

1 Answer 1


It looks like this may be a bug with selenium - see https://code.google.com/p/selenium/issues/detail?id=3734.

There are some workarounds in that thread, but I would suggest to perhaps instead of building an action chain like this, specify the click method with a keydown modifier. So you can

Actions click1 = new Actions(driver);

perhaps that may get around some of the issues you've been seeting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.