selenium 3.0.1 not working in Mac Sierra Safari Browser with protractor
Meta -
OS:
Mac OS Sierra
Selenium Version:
2.53.1 & 3.0.1
Browser:
Safari
We are running our protractor test cases in Mac OS Sierra version's Safari Version 10.0. We have mapped protractor to run on Selenium version 3.0.1. but still selenium throws the unsupportedopertionerror exception.
UnsupportedOperationError: Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' System info: host: 'CDC5-156088275-P.local', ip: '10.145.130.125', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12', java.version: '1.8.0_111' Driver info: org.openqa.selenium.safari.SafariDriver Capabilities [{applicationCacheEnabled=true, rotatable=false, databaseEnabled=true, handlesAlerts=true, version=12602.1.50, cleanSession=true, platform=MAC, nativeEvents=true, locationContextEnabled=false, webStorageEnabled=true, browserName=safari, javascriptEnabled=true, cssSelectorsEnabled=true}]
Please help us to resolve this issue. We have also enabled the remote automation checkbox in the develop menu.
For issues please provide a concise reproducible test case and describe what results you are seeing and what results you expect.
See CONTRIBUTING.md
@premkumarvarathan did you ever get this working? I'm having the hardest time getting my tests to run in Safari 10
I cannot get it to run either. Safari at 10.0.3 (12602.4.8) and MacOS Sierra at 10.12.3 (16D32)
I execute
var webDriver = require('selenium-webdriver');
var seleniumDrivers = require('selenium-drivers');
seleniumDrivers.init({
name: 'Safari',
browserName: 'safari',
download: true
}).then(function () {
var driver = new webDriver.Builder()
.forBrowser('safari')
.build();
driver.get('http://www.google.com/ncr');
});
and get
NOTICE: requires minimum OSX: ElCaptain & Safari 10.0!
/Users/levin/coding/satoshipay/nano-client/node_modules/selenium-webdriver/lib/promise.js:2517
throw error;
^
Error: Server terminated early with status 1
at earlyTermination.catch.e (/Users/levin/coding/satoshipay/nano-client/node_modules/selenium-webdriver/remote/index.js:252:52)
at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
at Function.createSession (/Users/levin/coding/satoshipay/nano-client/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
at Function.createSession (/Users/levin/coding/satoshipay/nano-client/node_modules/selenium-webdriver/safari.js:214:55)
at createDriver (/Users/levin/coding/satoshipay/nano-client/node_modules/selenium-webdriver/index.js:167:33)
at Builder.build (/Users/levin/coding/satoshipay/nano-client/node_modules/selenium-webdriver/index.js:657:16)
at /Users/levin/coding/satoshipay/nano-client/selenium-example.js:13:6
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3
The Safari Web Driver works fine with the python bindings though...
As the last release for the package selenium-webdriver has been three months ago, I suspect that it is not up to date for Sierra.
Disclaimer: I do not know anything about MacOS and so on. I just have to get automated tests running for Safari so I might do something really wrong here, as I usually use linux. I am happy to post much more information, if helpful...
As the last release for the package selenium-webdriver has been three months ago, I suspect that it is not up to date for Sierra.
Everything should work fine on Sierra if you use the correct driver (supplied by Apple). You shouldn't be using Selenium's SafariDriver with Safari 10.
for details, see: https://webkit.org/blog/6900/webdriver-support-in-safari-10/
specifically:
"The old SafariDriver implementation is no longer maintained and should not be used."
"Safari now provides native support for the WebDriver API. Starting with Safari 10 on OS X El Capitan and macOS Sierra, Safari comes bundled with a new driver implementation that’s maintained by the Web Developer Experience team at Apple."
Also note:
"Safari’s WebDriver support is turned off by default"
@cgoldberg Do you actually have a working example or are you saying it should work based on the blog post? I haven't been able to get my tests to run at all in Safari 10 on macOS Sierra with 3.0.1 so unless you've actually gotten it to work and can share how you did so, this comment isn't so helpful.
So as I said, I have no special webdriver installed. The native one under /usr/bin/safaridriver is being used. The python bindings (pip install selenium) work like a charm, but I am a node coder, so I would prefer having my tests run in node too. I have to second @pittgoose on this. If anyone has the same setup and got it running with the aforementioned setup, it would be most interesting. Until then I rather assume that it is currently broken.
BTW: I actually do not want to use selenium-webdriver itself, but webdriver.io to run mocha tests. This of course does not work at all too, with the weirdest error messages. This is why I made the simplest example to narrow down, where I assume the broken part of the toolchain is. So far it looks like it is selenium-webdriver.
I have issues of basic functions like click on working on safari 10 with selenium 3.3.1. On execution of the click function, it doesnt even throw the error and the execution just continues without the action.
I have issues working on safari 10 with selenium 3.0.0, 3.1.0, 3.3.1. On execution it opens up browser and required site, but it don't perform any action on it, and then it throws this Exception, org.openqa.selenium.UnsupportedCommandException: Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000' Any help will be appreciated. Thanks.
I'm also facing the same issue as @stripurari. Does anyone have a solution to this ?
@vijaygoturi I have the exact same issue :-(
@fabiyo which version of safari web driver extension are you using?
@RaviKlair I tried with all versions from 3.0.0+. Just noticed that when using Safari 10, and stopping the current selenium session and double clicking the link it works. Single click is just not working; I cannot simulate page navigation like this.. Working on Sierra 10.12.4 btw
@fabiyo new safari webriver is not currently working . See http://stackoverflow.com/questions/43380116/cant-run-protractor-tests-on-macos-sierra-safari-10-0-2/43383710#43383710
For the mean time I'm just running my tests with following webdriver-manager start --versions.standlone 2.53.1
@RaviKlair Oh I see now my confusion; I am using Java and Maven to test some Java code. Also here totally not working :-) So I guess we will have to wait for a new release of Selenium's Safari driver...
I am kind of trying to do the actions using javascript instead of native actions.
On Mon, Apr 24, 2017 at 10:57 PM, Fabrizio Usai [email protected] wrote:
@RaviKlair https://github.com/RaviKlair Oh I see now my confusion; I am using Java and Maven to test some Java code. Also here totally not working :-) So I guess we will have to wait for a new release of Selenium's Safari driver...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SeleniumHQ/selenium/issues/3145#issuecomment-296758121, or mute the thread https://github.com/notifications/unsubscribe-auth/ALfWrUloS1hq7TNPdMjOMy594gyBdlCeks5rzNtsgaJpZM4K38vK .
-- Thanks, Vijay Kumar Goturi.
@fabiyo,
"I guess we will have to wait for a new release of Selenium's Safari driver..."
keep in mind that SafariDriver is no longer developed or maintained by the Selenium project. Development is now in Apple's hands :)
see: https://webkit.org/blog/6900/webdriver-support-in-safari-10/
@cgoldberg I am aware of that. But just to be clear about something. Selenium will still provide an API for (for instance Java code) simulating browser events, right? Or is it Apple who will proved a Java API for communication with safari?
Is anyone able to do stable selenium webdriver testing with Safari 10? Maximizing/resizing browser doesn't work, isDisplayed() doesn't work, using Select class for selecting a dropdown option doesn't work... How are people testing on Safari 10?
@cafshari I found as well that maximizing the Safari browser doesn't work with Standard Release v10. However, it does work with Safari Preview Technology v11.