@@ -36,7 +36,7 @@ module Ios
36
36
# This options affects only client side as <code>:appium_lib</code> key.<br>
37
37
# Read {::Appium::Core::Driver} about each attribute
38
38
class Options
39
- attr_reader :custom_url , :default_wait , :export_session , :export_session_path ,
39
+ attr_reader :custom_url , :default_wait ,
40
40
:port , :wait_timeout , :wait_interval , :listener ,
41
41
:direct_connect , :enable_idempotency_header
42
42
@@ -45,10 +45,6 @@ def initialize(appium_lib_opts)
45
45
@default_wait = appium_lib_opts . fetch :wait , nil
46
46
@enable_idempotency_header = appium_lib_opts . fetch :enable_idempotency_header , true
47
47
48
- # bump current session id into a particular file
49
- @export_session = appium_lib_opts . fetch :export_session , false
50
- @export_session_path = appium_lib_opts . fetch :export_session_path , default_tmp_appium_lib_session
51
-
52
48
@direct_connect = appium_lib_opts . fetch :direct_connect , true
53
49
54
50
@port = appium_lib_opts . fetch :port , Driver ::DEFAULT_APPIUM_PORT
@@ -137,12 +133,6 @@ class Driver
137
133
# @return [String]
138
134
attr_reader :custom_url
139
135
140
- # Export session id to textfile in /tmp for 3rd party tools. False by default.
141
- # @return [Boolean]
142
- attr_reader :export_session
143
- # @return [String] By default, session id is exported in '/tmp/appium_lib_session'
144
- attr_reader :export_session_path
145
-
146
136
# Default wait time for elements to appear in Appium server side.
147
137
# Provide <code>{ appium_lib: { wait: 30 } }</code> to {::Appium::Core.for}
148
138
# @return [Integer]
@@ -222,7 +212,6 @@ class Driver
222
212
# app: '/path/to/MyiOS.app'
223
213
# },
224
214
# appium_lib: {
225
- # export_session: false,
226
215
# port: 8080,
227
216
# wait: 0,
228
217
# wait_timeout: 20,
@@ -245,7 +234,6 @@ class Driver
245
234
# },
246
235
# appium_lib: {
247
236
# server_url: 'http://custom-host:8080/wd/hub.com',
248
- # export_session: false,
249
237
# wait: 0,
250
238
# wait_timeout: 20,
251
239
# wait_interval: 0.3,
@@ -266,7 +254,6 @@ class Driver
266
254
# app: '/path/to/MyiOS.app'
267
255
# },
268
256
# appium_lib: {
269
- # export_session: false,
270
257
# wait: 0,
271
258
# wait_timeout: 20,
272
259
# wait_interval: 0.3,
@@ -439,9 +426,6 @@ def start_driver(server_url: nil,
439
426
d_c = DirectConnections . new ( @driver . capabilities )
440
427
@driver . update_sending_request_to ( protocol : d_c . protocol , host : d_c . host , port : d_c . port , path : d_c . path )
441
428
end
442
-
443
- # export session
444
- write_session_id ( @driver . session_id , @export_session_path ) if @export_session
445
429
rescue Errno ::ECONNREFUSED
446
430
raise "ERROR: Unable to connect to Appium. Is the server running on #{ @custom_url } ?"
447
431
end
@@ -494,9 +478,6 @@ def attach_to(session_id, url: nil, automation_name: nil, platform_name: nil,
494
478
existing_session_id : session_id ,
495
479
automation_name : automation_name ,
496
480
platform_name : platform_name )
497
-
498
- # export session
499
- write_session_id ( @driver . session_id , @export_session_path ) if @export_session
500
481
rescue Errno ::ECONNREFUSED
501
482
raise "ERROR: Unable to connect to Appium. Is the server running on #{ @custom_url } ?"
502
483
end
@@ -568,23 +549,6 @@ def appium_server_version
568
549
{ }
569
550
end
570
551
571
- # Return the platform version as an array of integers
572
- # @return [Array<Integer>]
573
- #
574
- # @example
575
- #
576
- # @core.platform_version #=> [10,1,1]
577
- #
578
- def platform_version
579
- ::Appium ::Logger . warn (
580
- '[DEPRECATION] platform_version method will be. ' \
581
- 'Please check the platformVersion via @driver.capabilities["platformVersion"] instead.'
582
- )
583
-
584
- p_version = @driver . capabilities [ 'platformVersion' ] || @driver . session_capabilities [ 'platformVersion' ]
585
- p_version . split ( '.' ) . map ( &:to_i )
586
- end
587
-
588
552
private
589
553
590
554
def convert_to_symbol ( value )
@@ -699,9 +663,6 @@ def set_appium_lib_specific_values(appium_lib_opts)
699
663
700
664
@default_wait = opts . default_wait
701
665
702
- @export_session = opts . export_session
703
- @export_session_path = opts . export_session_path
704
-
705
666
@port = opts . port
706
667
707
668
@wait_timeout = opts . wait_timeout
@@ -743,19 +704,6 @@ def set_automation_name_if_nil
743
704
@driver . capabilities [ 'automationName' ] . downcase . strip . intern
744
705
end
745
706
end
746
-
747
- # @private
748
- def write_session_id ( session_id , export_path = '/tmp/appium_lib_session' )
749
- ::Appium ::Logger . warn (
750
- '[DEPRECATION] export_session option will be removed. ' \
751
- 'Please save the session id by yourself with #session_id method like @driver.session_id.'
752
- )
753
- export_path = export_path . tr ( '/' , '\\' ) if ::Appium ::Core ::Base . platform . windows?
754
- File . write ( export_path , session_id )
755
- rescue IOError => e
756
- ::Appium ::Logger . warn e
757
- nil
758
- end
759
707
end # class Driver
760
708
end # module Core
761
709
end # module Appium
0 commit comments