Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

[SafariDriver] Driver requires a persistent extension installation. #3772

Closed
lukeis opened this issue Mar 3, 2016 · 13 comments
Closed

[SafariDriver] Driver requires a persistent extension installation. #3772

lukeis opened this issue Mar 3, 2016 · 13 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 3772

We should figure out how to install the SafariDriver extension at run-time (ideally,
in a clean profile).

Reported by jmleyba on 2012-04-22 00:06:11

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by jmleyba on 2012-04-22 00:06:18

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Jim was looking at this on Windows

Reported by dawagner on 2012-04-22 04:26:34

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Is the persistence issue on Windows only or also affects Mac?

Reported by mangaroo on 2012-05-11 03:15:20

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Windows and Mac.

Reported by jmleyba on 2012-05-11 20:34:26

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

The SafariDriver is still extension based, but as of revision dcb0f976cf54, there is
a prebuilt copy of this extension checked into the repo and bundled with java client.
 This extension will be automatically installed when creating a new SafariDriver instance
and uninstalled on quit() or JVM shutdown.  Safari's previous extension settings will
be restored when the extension is uninstalled.

You can still use a custom version of the extension with the webdriver.safari.driver
system property, or you can skip installing the extension altogether with -Dwebdriver.safari.noinstall=true
(e.g. if you've preinstalled a copy of the extension).

For all intents and purposes, this is now fixed.

Reported by jmleyba on 2013-01-22 00:54:30

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

A few questions for clarification:

* So to confirm, this will now work with SafariDriver() on Java client and when requesting
for Safari with RemoteWebDriver for any language binding/client? So this is bundled
into the standalone server JAR as well? Or just the Java client JAR?

* If specifying custom extension, does it use a copy of the specified extension (like
specifying Firefox profiles) or the exact file? Because Safari browser will always
delete the extension installer file after installation. So if it uses exact file, should
make a note of that for users so they won't be confused when at next run, the specified
extension doesn't exist.

* Is this going to be (automatically) in place going forward for each new release or
just for this current/next release? Where a prebuilt copy of extension gets checked
into repo (or auto-built from source) then bundled into JARs for every release as part
of build/release process. By the way, which release is this currently fixed for 2.28
or next release (or trunk build), I'm assuming the latter?

* I thought the Selenium team had issue getting Apple certificate for the project to
distribute a binary installer. Did that get resolved, or did the team decide to just
bypass that for now and do this unofficially with one of the developer's certificate?

Reported by mangaroo on 2013-01-22 02:42:08

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

1. When you request safari through the java standalone server, it ultimately invokes
"new SafariDriver()", so yes, you will get the same benefit that way.

2. All of your existing extensions will be backed up to a temporary folder (and restored
when you call webdriver.quit() or the JVM exits).  The prebuilt extension is extracted
from the jar and copied into Safari's extension folder, so you can reuse it.

3. The prebuilt will have to be manually generated and checked into the repo, but it
will be automatically included in all future releases.

4. I used my dev certificate.

Reported by jmleyba on 2013-01-22 17:31:32

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

I think one question wasn't phrased correctly, so let me try again: 

if we specify a custom SafariDriver extension instead of the prebuilt one in the JAR,
will the process make a copy of the specified custom extension file and install using
the copy or will it install using the specified custom extension file itself as the
source? 

Reported by mangaroo on 2013-01-22 19:38:15

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

It copies it over. Being able to use your own extension specified through a system property
was actually implemented a while ago.  Try it out with 2.29

Reported by jmleyba on 2013-01-22 21:15:45

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Also just wanted to confirm, this new functionality does not affect Grid2 operation.
Start Selenium node (registering for Safari) as usual, and now it will auto-install
& uninstall the extension at every test, and not need to preinstall the extension as
before.

Reported by mangaroo on 2013-02-07 18:37:53

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Oops, comment 10 was meant to be a question, FYI. Sent too soon.

Reported by mangaroo on 2013-02-07 18:39:06

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

When you create a new session with the java server, it ultimately ends up using the
browser-specific class (e.g. FirefoxDriver, SafariDriver, etc.).  So yes, it should
use the pre-packaged extension for Grid2.

Reported by jmleyba on 2013-02-07 19:43:44

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:15:16

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant