@@ -194,7 +194,7 @@ class Driver
194
194
attr_reader :default_wait , :app_path , :app_name , :device ,
195
195
:app_package , :app_activity , :app_wait_activity ,
196
196
:sauce_username , :sauce_access_key , :port , :debug ,
197
- :export_session , :device_cap , :compress_xml
197
+ :export_session , :device_cap , :compress_xml , :custom_url
198
198
199
199
# The amount to sleep in seconds before every webdriver http call.
200
200
attr_accessor :global_webdriver_http_sleep
@@ -234,6 +234,8 @@ def initialize opts={}
234
234
# convert to downcased symbols
235
235
opts . each_pair { |k , v | opts [ k . to_s . downcase . strip . intern ] = v }
236
236
237
+ @custom_url = opts . fetch :server_url , false
238
+
237
239
@compress_xml = opts [ :compress_xml ] ? true : false
238
240
239
241
@export_session = opts . fetch :export_session , false
@@ -399,6 +401,7 @@ def absolute_app_path
399
401
# Get the server url for sauce or local based on env vars.
400
402
# @return [String] the server url
401
403
def server_url
404
+ return @custom_url if @custom_url
402
405
if !@sauce_username . nil? && !@sauce_access_key . nil?
403
406
"http://#{ @sauce_username } :#{ @sauce_access_key } @ondemand.saucelabs.com:80/wd/hub"
404
407
else
0 commit comments