0

Hello everybody: Here I have the next situation:

I want to click an element with Mac OS pressing Command button + click.

This is the code I have:

Actions action = new Actions(driver);

        //View full profile link
        WebElement fprofile = driver.findElement(By.className("something"));

        action.keyDown(Keys.COMMAND)
                .click(fprofile)
                .keyUp(Keys.COMMAND)
                .build()
                .perform();

It seems it's not working.

By other hand, I try to make a click with mouse middle button, but I cannot find how to do that.

nosequeweaponer
  • 511
  • 10
  • 38

1 Answers1

0

The solution to the part of keep pressing the Command button on Mac and click is the next:

action.keyDown(Keys.COMMAND)
                .click(WebElement)
                .keyUp(Keys.COMMAND)
                .build()
                .perform();

By other side, I cannot discover how to make a click over an element with the mouse middle button.

nosequeweaponer
  • 511
  • 10
  • 38