selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[SafariDriver] Unable to Right Click Element using Actions

Open chrisumitratech opened this issue 9 years ago • 2 comments

Meta -

OS:
OSX 10.11.6 Selenium Version:
2.53.0 Browser:
Safari

Browser Version:
10.0

Expected Behavior -

Should right click element being passed into method. In my application a context menu for the Element should appear.

Actual Behavior -

Get the following error from the SafariWebDriver running on the Agent:

Exception thrown org.openqa.selenium.WebDriverException: Unknown command: {"id":"jre8mp1j66q6","name":"mouseMoveTo","parameters":{"element":":wdc:1490790363654"}} (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 5 milliseconds Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'

Driver info: org.openqa.selenium.safari.SafariDriver Capabilities [{browserName=safari, takesScreenshot=true, javascriptEnabled=true, version=10.0, cssSelectorsEnabled=true, platform=MAC, secureSsl=true}]

Steps to reproduce -

I'm using the Selenium Grid plugin on Jenkins to control a SSH Slave on OSX and getting a RemoteWebDriver object.

I have tried both of the following options but nothing happens and get an error from the RemoteWebDriver:

var action = new Actions(WebDriver); action.ContextClick(webElement.Element).Perform();

and

var action = new Actions(WebDriver); action.KeyDown(Keys.Control).Click(webElement.Element).KeyUp(Keys.Control).Build().Perform();

chrisumitratech avatar Mar 29 '17 12:03 chrisumitratech

This is because you are using the legacy, extension-based SafariDriver which is no longer supported (and it never supported actions). You need to upgrade to Apple's SafariDriver implementation, available for Safari 10+

jleyba avatar Apr 01 '17 14:04 jleyba

How can we implement Apple's new safari driver to our project ?

I have found following link, but i don't know that how can i use it.

https://github.com/SeleniumHQ/selenium/tree/selenium-3.0.0-beta-4/dotnet

egemenceylan avatar Jun 06 '17 10:06 egemenceylan