Class: TestCentricity::Environ
- Inherits:
-
DataObject
show all
- Defined in:
- lib/testcentricity_apps/data_objects/environment.rb
Instance Attribute Summary collapse
Attributes inherited from DataObject
#context, #current, #hash_table
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from DataObject
current, current=
Constructor Details
#initialize(data) ⇒ Environ
Returns a new instance of Environ.
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 73
def initialize(data)
@user_id = data['USER_ID']
@password = data['PASSWORD']
@app_id = data['APP_ID']
@api_key = data['API_KEY']
@option1 = data['OPTIONAL_1']
@option2 = data['OPTIONAL_2']
@option3 = data['OPTIONAL_3']
@option4 = data['OPTIONAL_4']
@dns = data['DNS']
@db_username = data['DB_USERNAME']
@db_password = data['DB_PASSWORD']
@ios_app_path = data['IOS_APP_PATH']
@ios_ipa_path = data['IOS_IPA_PATH']
@ios_bundle_id = data['IOS_BUNDLE_ID']
@ios_test_id = data['IOS_TEST_ID']
@android_apk_path = data['ANDROID_APK_PATH']
@android_app_id = data['ANDROID_APP_ID']
@android_test_id = data['ANDROID_TEST_ID']
@deep_link_prefix = data['DEEP_LINK_PREFIX']
@mac_bundle_id = data['MAC_BUNDLE_ID']
super
end
|
Instance Attribute Details
#android_apk_path ⇒ Object
Returns the value of attribute android_apk_path.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def android_apk_path
@android_apk_path
end
|
#android_app_id ⇒ Object
Returns the value of attribute android_app_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def android_app_id
@android_app_id
end
|
#android_test_id ⇒ Object
Returns the value of attribute android_test_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def android_test_id
@android_test_id
end
|
Returns the value of attribute api_key.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def api_key
@api_key
end
|
Returns the value of attribute app_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def app_id
@app_id
end
|
#app_session_id ⇒ Object
Returns the value of attribute app_session_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def app_session_id
@app_session_id
end
|
#appium_driver ⇒ Object
Returns the value of attribute appium_driver.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def appium_driver
@appium_driver
end
|
#db_password ⇒ Object
Returns the value of attribute db_password.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def db_password
@db_password
end
|
#db_username ⇒ Object
Returns the value of attribute db_username.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def db_username
@db_username
end
|
#deep_link_prefix ⇒ Object
Returns the value of attribute deep_link_prefix.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def deep_link_prefix
@deep_link_prefix
end
|
#default_max_wait_time ⇒ Object
Returns the value of attribute default_max_wait_time.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def default_max_wait_time
@default_max_wait_time
end
|
Returns the value of attribute device.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def device
@device
end
|
#device_name ⇒ Object
Returns the value of attribute device_name.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def device_name
@device_name
end
|
#device_orientation ⇒ Object
Returns the value of attribute device_orientation.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def device_orientation
@device_orientation
end
|
#device_os ⇒ Object
Returns the value of attribute device_os.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def device_os
@device_os
end
|
#device_os_version ⇒ Object
Returns the value of attribute device_os_version.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def device_os_version
@device_os_version
end
|
#device_type ⇒ Object
Returns the value of attribute device_type.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def device_type
@device_type
end
|
Returns the value of attribute dns.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def dns
@dns
end
|
Returns the value of attribute driver.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def driver
@driver
end
|
#driver_name ⇒ Object
Returns the value of attribute driver_name.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def driver_name
@driver_name
end
|
#ios_app_path ⇒ Object
Returns the value of attribute ios_app_path.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def ios_app_path
@ios_app_path
end
|
#ios_bundle_id ⇒ Object
Returns the value of attribute ios_bundle_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def ios_bundle_id
@ios_bundle_id
end
|
#ios_ipa_path ⇒ Object
Returns the value of attribute ios_ipa_path.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def ios_ipa_path
@ios_ipa_path
end
|
#ios_test_id ⇒ Object
Returns the value of attribute ios_test_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def ios_test_id
@ios_test_id
end
|
Returns the value of attribute language.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def language
@language
end
|
Returns the value of attribute locale.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def locale
@locale
end
|
#mac_bundle_id ⇒ Object
Returns the value of attribute mac_bundle_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def mac_bundle_id
@mac_bundle_id
end
|
Returns the value of attribute option1.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def option1
@option1
end
|
Returns the value of attribute option2.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def option2
@option2
end
|
Returns the value of attribute option3.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def option3
@option3
end
|
Returns the value of attribute option4.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def option4
@option4
end
|
Returns the value of attribute os.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def os
@os
end
|
Returns the value of attribute parallel.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def parallel
@parallel
end
|
Returns the value of attribute password.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def password
@password
end
|
Returns the value of attribute platform.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def platform
@platform
end
|
#portal_context ⇒ Object
Returns the value of attribute portal_context.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def portal_context
@portal_context
end
|
#portal_status ⇒ Object
Returns the value of attribute portal_status.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def portal_status
@portal_status
end
|
#process_num ⇒ Object
Returns the value of attribute process_num.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def process_num
@process_num
end
|
#screen_size ⇒ Object
Returns the value of attribute screen_size.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def screen_size
@screen_size
end
|
#session_code ⇒ Object
Returns the value of attribute session_code.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def session_code
@session_code
end
|
#session_state ⇒ Object
Returns the value of attribute session_state.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def session_state
@session_state
end
|
#signed_in ⇒ Object
Returns the value of attribute signed_in.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def signed_in
@signed_in
end
|
#test_environment ⇒ Object
Returns the value of attribute test_environment.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def test_environment
@test_environment
end
|
#tunneling ⇒ Object
Returns the value of attribute tunneling.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def tunneling
@tunneling
end
|
Returns the value of attribute user_id.
71
72
73
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 71
def user_id
@user_id
end
|
Class Method Details
.app_session_id ⇒ Object
102
103
104
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 102
def self.app_session_id
@app_session_id
end
|
.appium_driver ⇒ Object
273
274
275
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 273
def self.appium_driver
@appium_driver
end
|
.appium_driver=(driver_instance) ⇒ Object
269
270
271
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 269
def self.appium_driver=(driver_instance)
@appium_driver = driver_instance
end
|
.default_max_wait_time ⇒ Object
150
151
152
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 150
def self.default_max_wait_time
@default_max_wait_time
end
|
.default_max_wait_time=(timeout) ⇒ Object
146
147
148
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 146
def self.default_max_wait_time=(timeout)
@default_max_wait_time = timeout
end
|
174
175
176
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 174
def self.device
@device
end
|
.device=(device) ⇒ Object
170
171
172
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 170
def self.device=(device)
@device = device
end
|
.device_name ⇒ Object
203
204
205
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 203
def self.device_name
@device_name
end
|
.device_name=(name) ⇒ Object
199
200
201
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 199
def self.device_name=(name)
@device_name = name
end
|
.device_orientation ⇒ Object
240
241
242
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 240
def self.device_orientation
@device_orientation
end
|
.device_orientation=(orientation) ⇒ Object
235
236
237
238
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 235
def self.device_orientation=(orientation)
orientation = orientation.downcase.to_sym if orientation.is_a?(String)
@device_orientation = orientation
end
|
.device_os ⇒ Object
211
212
213
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 211
def self.device_os
@device_os
end
|
.device_os=(os) ⇒ Object
207
208
209
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 207
def self.device_os=(os)
@device_os = os.downcase.to_sym
end
|
.device_os_version ⇒ Object
219
220
221
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 219
def self.device_os_version
@device_os_version
end
|
.device_os_version=(version) ⇒ Object
215
216
217
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 215
def self.device_os_version=(version)
@device_os_version = version
end
|
.device_type ⇒ Object
195
196
197
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 195
def self.device_type
@device_type
end
|
.device_type=(type) ⇒ Object
190
191
192
193
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 190
def self.device_type=(type)
type = type.downcase.to_sym if type.is_a?(String)
@device_type = type
end
|
256
257
258
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 256
def self.driver
@driver
end
|
.driver=(type) ⇒ Object
252
253
254
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 252
def self.driver=(type)
@driver = type
end
|
.driver_name ⇒ Object
265
266
267
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 265
def self.driver_name
@driver_name
end
|
.driver_name=(name) ⇒ Object
260
261
262
263
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 260
def self.driver_name=(name)
name = name.downcase.to_sym if name.is_a?(String)
@driver_name = name
end
|
.get_screen_shots ⇒ Object
345
346
347
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 345
def self.get_screen_shots
@screen_shots
end
|
.is_android? ⇒ Boolean
227
228
229
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 227
def self.is_android?
@device_os == :android
end
|
.is_device? ⇒ Boolean
178
179
180
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 178
def self.is_device?
@device == :device
end
|
.is_ios? ⇒ Boolean
223
224
225
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 223
def self.is_ios?
@device_os == :ios
end
|
.is_macos? ⇒ Boolean
231
232
233
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 231
def self.is_macos?
@device_os == :mac
end
|
.is_mobile? ⇒ Boolean
309
310
311
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 309
def self.is_mobile?
@platform == :mobile
end
|
.is_signed_in? ⇒ Boolean
317
318
319
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 317
def self.is_signed_in?
@signed_in
end
|
.is_simulator? ⇒ Boolean
182
183
184
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 182
def self.is_simulator?
@device == :simulator
end
|
.is_web? ⇒ Boolean
186
187
188
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 186
def self.is_web?
@device == :web
end
|
289
290
291
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 289
def self.language
@language
end
|
.language=(language) ⇒ Object
285
286
287
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 285
def self.language=(language)
@language = language
end
|
297
298
299
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 297
def self.locale
@locale
end
|
.locale=(locale) ⇒ Object
293
294
295
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 293
def self.locale=(locale)
@locale = locale
end
|
.new_app_session ⇒ Object
98
99
100
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 98
def self.new_app_session
@app_session_id = Time.now.strftime('%Y%m%d%H%M%S%L')
end
|
166
167
168
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 166
def self.os
@os
end
|
162
163
164
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 162
def self.os=(os)
@os = os
end
|
126
127
128
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 126
def self.parallel
@parallel
end
|
.parallel=(state) ⇒ Object
122
123
124
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 122
def self.parallel=(state)
@parallel = state
end
|
305
306
307
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 305
def self.platform
@platform
end
|
301
302
303
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 301
def self.platform=(platform)
@platform = platform
end
|
.portal_context ⇒ Object
333
334
335
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 333
def self.portal_context
@portal_context
end
|
.portal_context=(portal_context) ⇒ Object
329
330
331
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 329
def self.portal_context=(portal_context)
@portal_context = portal_context
end
|
.portal_state ⇒ Object
325
326
327
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 325
def self.portal_state
@portal_status
end
|
.portal_state=(portal_state) ⇒ Object
321
322
323
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 321
def self.portal_state=(portal_state)
@portal_status = portal_state
end
|
.process_num ⇒ Object
134
135
136
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 134
def self.process_num
@process_num
end
|
.process_num=(num) ⇒ Object
130
131
132
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 130
def self.process_num=(num)
@process_num = num
end
|
.reset_contexts ⇒ Object
349
350
351
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 349
def self.reset_contexts
@screen_shots = []
end
|
.save_screen_shot(screen_shot) ⇒ Object
341
342
343
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 341
def self.save_screen_shot(screen_shot)
@screen_shots.push(screen_shot)
end
|
.screen_size ⇒ Object
248
249
250
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 248
def self.screen_size
@screen_size
end
|
.screen_size=(size) ⇒ Object
244
245
246
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 244
def self.screen_size=(size)
@screen_size = size
end
|
.session_code ⇒ Object
106
107
108
109
110
111
112
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 106
def self.session_code
if @session_code.nil?
characters = ('a'..'z').to_a
@session_code = (0..12).map { characters.sample }.join
end
@session_code
end
|
.session_id ⇒ Object
114
115
116
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 114
def self.session_id
@session_id
end
|
.session_state ⇒ Object
158
159
160
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 158
def self.session_state
@session_state
end
|
.session_state=(session_state) ⇒ Object
154
155
156
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 154
def self.session_state=(session_state)
@session_state = session_state
end
|
.session_time_stamp ⇒ Object
118
119
120
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 118
def self.session_time_stamp
@session_time_stamp
end
|
.set_external_page(state) ⇒ Object
337
338
339
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 337
def self.set_external_page(state)
@external_page = state
end
|
.set_signed_in(signed_in) ⇒ Object
313
314
315
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 313
def self.set_signed_in(signed_in)
@signed_in = signed_in
end
|
.test_environment ⇒ Object
138
139
140
141
142
143
144
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 138
def self.test_environment
if @test_environment.blank?
nil
else
@test_environment.downcase.to_sym
end
end
|
.tunneling ⇒ Object
281
282
283
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 281
def self.tunneling
@tunneling
end
|
.tunneling=(state) ⇒ Object
277
278
279
|
# File 'lib/testcentricity_apps/data_objects/environment.rb', line 277
def self.tunneling=(state)
@tunneling = state
end
|