Class: TestCentricity::Environ
- Inherits:
-
DataObject
show all
- Defined in:
- lib/testcentricity_web/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.
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 119
def initialize(data)
@protocol = data['PROTOCOL']
@hostname = data['HOST_NAME']
@base_url = data['BASE_URL']
@user_id = data['USER_ID']
@password = data['PASSWORD']
@append = data['APPEND']
@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']
super
end
|
Instance Attribute Details
#a11y_standard ⇒ Object
Returns the value of attribute a11y_standard.
101
102
103
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 101
def a11y_standard
@a11y_standard
end
|
Returns the value of attribute api_key.
110
111
112
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 110
def api_key
@api_key
end
|
Returns the value of attribute app_id.
109
110
111
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 109
def app_id
@app_id
end
|
Returns the value of attribute append.
108
109
110
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 108
def append
@append
end
|
Returns the value of attribute base_url.
105
106
107
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 105
def base_url
@base_url
end
|
Returns the value of attribute browser.
74
75
76
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 74
def browser
@browser
end
|
#browser_size ⇒ Object
Returns the value of attribute browser_size.
75
76
77
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 75
def browser_size
@browser_size
end
|
#db_password ⇒ Object
Returns the value of attribute db_password.
117
118
119
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 117
def db_password
@db_password
end
|
#db_username ⇒ Object
Returns the value of attribute db_username.
116
117
118
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 116
def db_username
@db_username
end
|
Returns the value of attribute device.
80
81
82
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 80
def device
@device
end
|
#device_name ⇒ Object
Returns the value of attribute device_name.
81
82
83
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 81
def device_name
@device_name
end
|
#device_orientation ⇒ Object
Returns the value of attribute device_orientation.
85
86
87
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 85
def device_orientation
@device_orientation
end
|
#device_os ⇒ Object
Returns the value of attribute device_os.
83
84
85
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 83
def device_os
@device_os
end
|
#device_os_version ⇒ Object
Returns the value of attribute device_os_version.
84
85
86
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 84
def device_os_version
@device_os_version
end
|
#device_type ⇒ Object
Returns the value of attribute device_type.
82
83
84
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 82
def device_type
@device_type
end
|
Returns the value of attribute dns.
115
116
117
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 115
def dns
@dns
end
|
Returns the value of attribute driver.
87
88
89
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 87
def driver
@driver
end
|
#external_page ⇒ Object
Returns the value of attribute external_page.
99
100
101
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 99
def external_page
@external_page
end
|
Returns the value of attribute grid.
88
89
90
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 88
def grid
@grid
end
|
Returns the value of attribute headless.
76
77
78
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 76
def headless
@headless
end
|
Returns the value of attribute hostname.
104
105
106
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 104
def hostname
@hostname
end
|
Returns the value of attribute language.
91
92
93
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 91
def language
@language
end
|
Returns the value of attribute locale.
90
91
92
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 90
def locale
@locale
end
|
Returns the value of attribute option1.
111
112
113
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 111
def option1
@option1
end
|
Returns the value of attribute option2.
112
113
114
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 112
def option2
@option2
end
|
Returns the value of attribute option3.
113
114
115
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 113
def option3
@option3
end
|
Returns the value of attribute option4.
114
115
116
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 114
def option4
@option4
end
|
Returns the value of attribute os.
79
80
81
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 79
def os
@os
end
|
Returns the value of attribute parallel.
93
94
95
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 93
def parallel
@parallel
end
|
Returns the value of attribute password.
107
108
109
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 107
def password
@password
end
|
Returns the value of attribute platform.
86
87
88
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 86
def platform
@platform
end
|
#portal_context ⇒ Object
Returns the value of attribute portal_context.
98
99
100
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 98
def portal_context
@portal_context
end
|
#portal_status ⇒ Object
Returns the value of attribute portal_status.
97
98
99
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 97
def portal_status
@portal_status
end
|
#process_num ⇒ Object
Returns the value of attribute process_num.
94
95
96
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 94
def process_num
@process_num
end
|
Returns the value of attribute protocol.
103
104
105
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 103
def protocol
@protocol
end
|
#session_code ⇒ Object
Returns the value of attribute session_code.
78
79
80
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 78
def session_code
@session_code
end
|
#session_state ⇒ Object
Returns the value of attribute session_state.
77
78
79
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 77
def session_state
@session_state
end
|
#signed_in ⇒ Object
Returns the value of attribute signed_in.
96
97
98
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 96
def signed_in
@signed_in
end
|
#test_environment ⇒ Object
Returns the value of attribute test_environment.
73
74
75
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 73
def test_environment
@test_environment
end
|
#tunneling ⇒ Object
Returns the value of attribute tunneling.
89
90
91
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 89
def tunneling
@tunneling
end
|
Returns the value of attribute user_id.
106
107
108
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 106
def user_id
@user_id
end
|
Class Method Details
183
184
185
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 183
def self.browser
@browser
end
|
.browser=(browser) ⇒ Object
179
180
181
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 179
def self.browser=(browser)
@browser = browser.downcase.to_sym
end
|
.browser_size ⇒ Object
191
192
193
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 191
def self.browser_size
@browser_size
end
|
.browser_size=(size) ⇒ Object
187
188
189
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 187
def self.browser_size=(size)
@browser_size = size
end
|
223
224
225
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 223
def self.device
@device
end
|
.device=(device) ⇒ Object
219
220
221
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 219
def self.device=(device)
@device = device
end
|
.device_name ⇒ Object
251
252
253
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 251
def self.device_name
@device_name
end
|
.device_name=(name) ⇒ Object
247
248
249
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 247
def self.device_name=(name)
@device_name = name
end
|
.device_orientation ⇒ Object
283
284
285
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 283
def self.device_orientation
@device_orientation
end
|
.device_orientation=(orientation) ⇒ Object
279
280
281
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 279
def self.device_orientation=(orientation)
@device_orientation = orientation.downcase.to_sym
end
|
.device_os ⇒ Object
259
260
261
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 259
def self.device_os
@device_os
end
|
.device_os=(os) ⇒ Object
255
256
257
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 255
def self.device_os=(os)
@device_os = os.downcase.to_sym
end
|
.device_os_version ⇒ Object
267
268
269
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 267
def self.device_os_version
@device_os_version
end
|
.device_os_version=(version) ⇒ Object
263
264
265
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 263
def self.device_os_version=(version)
@device_os_version = version
end
|
.device_type ⇒ Object
243
244
245
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 243
def self.device_type
@device_type
end
|
.device_type=(type) ⇒ Object
239
240
241
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 239
def self.device_type=(type)
@device_type = type.downcase.to_sym
end
|
291
292
293
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 291
def self.driver
@driver
end
|
.driver=(type) ⇒ Object
287
288
289
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 287
def self.driver=(type)
@driver = type
end
|
.external_page ⇒ Object
367
368
369
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 367
def self.external_page
@external_page
end
|
.get_screen_shots ⇒ Object
375
376
377
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 375
def self.get_screen_shots
@screen_shots
end
|
299
300
301
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 299
def self.grid
@grid
end
|
.grid=(type) ⇒ Object
295
296
297
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 295
def self.grid=(type)
@grid = type
end
|
199
200
201
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 199
def self.headless
@headless
end
|
.headless=(state) ⇒ Object
195
196
197
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 195
def self.headless=(state)
@headless = state
end
|
.is_android? ⇒ Boolean
275
276
277
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 275
def self.is_android?
@device_os == :android
end
|
.is_desktop? ⇒ Boolean
335
336
337
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 335
def self.is_desktop?
@platform == :desktop
end
|
.is_device? ⇒ Boolean
227
228
229
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 227
def self.is_device?
@device == :device
end
|
.is_ios? ⇒ Boolean
271
272
273
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 271
def self.is_ios?
@device_os == :ios
end
|
.is_mobile? ⇒ Boolean
331
332
333
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 331
def self.is_mobile?
@platform == :mobile
end
|
.is_signed_in? ⇒ Boolean
343
344
345
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 343
def self.is_signed_in?
@signed_in
end
|
.is_simulator? ⇒ Boolean
231
232
233
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 231
def self.is_simulator?
@device == :simulator
end
|
.is_web? ⇒ Boolean
235
236
237
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 235
def self.is_web?
@device == :web
end
|
315
316
317
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 315
def self.language
@language
end
|
.language=(language) ⇒ Object
311
312
313
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 311
def self.language=(language)
@language = language
end
|
323
324
325
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 323
def self.locale
@locale
end
|
.locale=(locale) ⇒ Object
319
320
321
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 319
def self.locale=(locale)
@locale = locale
end
|
215
216
217
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 215
def self.os
@os
end
|
211
212
213
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 211
def self.os=(os)
@os = os
end
|
159
160
161
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 159
def self.parallel
@parallel
end
|
.parallel=(state) ⇒ Object
155
156
157
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 155
def self.parallel=(state)
@parallel = state
end
|
327
328
329
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 327
def self.platform=(platform)
@platform = platform
end
|
.portal_context ⇒ Object
359
360
361
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 359
def self.portal_context
@portal_context
end
|
.portal_context=(portal_context) ⇒ Object
355
356
357
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 355
def self.portal_context=(portal_context)
@portal_context = portal_context
end
|
.portal_state ⇒ Object
351
352
353
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 351
def self.portal_state
@portal_status
end
|
.portal_state=(portal_state) ⇒ Object
347
348
349
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 347
def self.portal_state=(portal_state)
@portal_status = portal_state
end
|
.process_num ⇒ Object
167
168
169
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 167
def self.process_num
@process_num
end
|
.process_num=(num) ⇒ Object
163
164
165
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 163
def self.process_num=(num)
@process_num = num
end
|
.reset_contexts ⇒ Object
379
380
381
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 379
def self.reset_contexts
@screen_shots = []
end
|
.save_screen_shot(screen_shot) ⇒ Object
371
372
373
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 371
def self.save_screen_shot(screen_shot)
@screen_shots.push(screen_shot)
end
|
.session_code ⇒ Object
139
140
141
142
143
144
145
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 139
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
147
148
149
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 147
def self.session_id
@session_id
end
|
.session_state ⇒ Object
207
208
209
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 207
def self.session_state
@session_state
end
|
.session_state=(session_state) ⇒ Object
203
204
205
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 203
def self.session_state=(session_state)
@session_state = session_state
end
|
.session_time_stamp ⇒ Object
151
152
153
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 151
def self.session_time_stamp
@session_time_stamp
end
|
.set_external_page(state) ⇒ Object
363
364
365
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 363
def self.set_external_page(state)
@external_page = state
end
|
.set_signed_in(signed_in) ⇒ Object
339
340
341
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 339
def self.set_signed_in(signed_in)
@signed_in = signed_in
end
|
.test_environment ⇒ Object
171
172
173
174
175
176
177
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 171
def self.test_environment
if @test_environment.blank?
nil
else
@test_environment.downcase.to_sym
end
end
|
.tunneling ⇒ Object
307
308
309
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 307
def self.tunneling
@tunneling
end
|
.tunneling=(state) ⇒ Object
303
304
305
|
# File 'lib/testcentricity_web/data_objects/environment.rb', line 303
def self.tunneling=(state)
@tunneling = state
end
|