@@ -25,21 +25,17 @@ class Service(service.Service):
25
25
Object that manages the starting and stopping of the SafariDriver
26
26
"""
27
27
28
- def __init__ (self , executable_path = None , port = 0 , quiet = False , use_legacy = False ):
28
+ def __init__ (self , port = 0 , quiet = False ):
29
29
"""
30
30
Creates a new instance of the Service
31
31
32
32
:Args:
33
33
- executable_path : Path to the SafariDriver
34
34
- port : Port the service is running on """
35
35
36
- if not use_legacy and os .path .exists ('/usr/bin/safaridriver' ):
37
- path = '/usr/bin/safaridriver'
38
- self .legacy_driver = False
39
- else :
40
- path = 'java'
41
- self .standalone_jar = executable_path
42
- self .legacy_driver = True
36
+ path = '/usr/bin/safaridriver'
37
+ if not os .path .exists (path ):
38
+ raise Exception ("SafariDriver requires Safari 10 on OSX El Capitan or greater" )
43
39
44
40
if port == 0 :
45
41
port = utils .free_port ()
@@ -51,16 +47,11 @@ def __init__(self, executable_path=None, port=0, quiet=False, use_legacy=False):
51
47
service .Service .__init__ (self , path , port , log )
52
48
53
49
def command_line_args (self ):
54
- if self .legacy_driver :
55
- return ["-jar" , self .standalone_jar , "-port" , "%s" % self .port ]
56
50
return ["-p" , "%s" % self .port ]
57
51
58
52
@property
59
53
def service_url (self ):
60
54
"""
61
55
Gets the url of the SafariDriver Service
62
56
"""
63
- if not self .legacy_driver :
64
- return "http://localhost:%d" % self .port
65
- else :
66
- return "http://localhost:%d/wd/hub" % self .port
57
+ return "http://localhost:%d" % self .port
0 commit comments