Class: TestCentricity::Environ
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=, set_current
Constructor Details
#initialize(data) ⇒ Environ
Returns a new instance of Environ.
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# File 'lib/testcentricity_web/environment.rb', line 60
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']
@option1 = data['OPTIONAL_1']
@option2 = data['OPTIONAL_2']
@dns = data['DNS']
@db_username = data['DB_USERNAME']
@db_password = data['DB_PASSWORD']
super
end
|
Instance Attribute Details
Returns the value of attribute append.
53
54
55
|
# File 'lib/testcentricity_web/environment.rb', line 53
def append
@append
end
|
Returns the value of attribute base_url.
50
51
52
|
# File 'lib/testcentricity_web/environment.rb', line 50
def base_url
@base_url
end
|
Returns the value of attribute browser.
30
31
32
|
# File 'lib/testcentricity_web/environment.rb', line 30
def browser
@browser
end
|
#browser_size ⇒ Object
Returns the value of attribute browser_size.
31
32
33
|
# File 'lib/testcentricity_web/environment.rb', line 31
def browser_size
@browser_size
end
|
#db_password ⇒ Object
Returns the value of attribute db_password.
58
59
60
|
# File 'lib/testcentricity_web/environment.rb', line 58
def db_password
@db_password
end
|
#db_username ⇒ Object
Returns the value of attribute db_username.
57
58
59
|
# File 'lib/testcentricity_web/environment.rb', line 57
def db_username
@db_username
end
|
Returns the value of attribute device.
34
35
36
|
# File 'lib/testcentricity_web/environment.rb', line 34
def device
@device
end
|
#device_name ⇒ Object
Returns the value of attribute device_name.
35
36
37
|
# File 'lib/testcentricity_web/environment.rb', line 35
def device_name
@device_name
end
|
#device_orientation ⇒ Object
Returns the value of attribute device_orientation.
38
39
40
|
# File 'lib/testcentricity_web/environment.rb', line 38
def device_orientation
@device_orientation
end
|
#device_os ⇒ Object
Returns the value of attribute device_os.
37
38
39
|
# File 'lib/testcentricity_web/environment.rb', line 37
def device_os
@device_os
end
|
#device_type ⇒ Object
Returns the value of attribute device_type.
36
37
38
|
# File 'lib/testcentricity_web/environment.rb', line 36
def device_type
@device_type
end
|
Returns the value of attribute dns.
56
57
58
|
# File 'lib/testcentricity_web/environment.rb', line 56
def dns
@dns
end
|
Returns the value of attribute driver.
40
41
42
|
# File 'lib/testcentricity_web/environment.rb', line 40
def driver
@driver
end
|
#external_page ⇒ Object
Returns the value of attribute external_page.
46
47
48
|
# File 'lib/testcentricity_web/environment.rb', line 46
def external_page
@external_page
end
|
Returns the value of attribute hostname.
49
50
51
|
# File 'lib/testcentricity_web/environment.rb', line 49
def hostname
@hostname
end
|
Returns the value of attribute option1.
54
55
56
|
# File 'lib/testcentricity_web/environment.rb', line 54
def option1
@option1
end
|
Returns the value of attribute option2.
55
56
57
|
# File 'lib/testcentricity_web/environment.rb', line 55
def option2
@option2
end
|
Returns the value of attribute os.
33
34
35
|
# File 'lib/testcentricity_web/environment.rb', line 33
def os
@os
end
|
Returns the value of attribute password.
52
53
54
|
# File 'lib/testcentricity_web/environment.rb', line 52
def password
@password
end
|
Returns the value of attribute platform.
39
40
41
|
# File 'lib/testcentricity_web/environment.rb', line 39
def platform
@platform
end
|
#portal_context ⇒ Object
Returns the value of attribute portal_context.
45
46
47
|
# File 'lib/testcentricity_web/environment.rb', line 45
def portal_context
@portal_context
end
|
#portal_status ⇒ Object
Returns the value of attribute portal_status.
44
45
46
|
# File 'lib/testcentricity_web/environment.rb', line 44
def portal_status
@portal_status
end
|
Returns the value of attribute protocol.
48
49
50
|
# File 'lib/testcentricity_web/environment.rb', line 48
def protocol
@protocol
end
|
#session_state ⇒ Object
Returns the value of attribute session_state.
32
33
34
|
# File 'lib/testcentricity_web/environment.rb', line 32
def session_state
@session_state
end
|
#signed_in ⇒ Object
Returns the value of attribute signed_in.
43
44
45
|
# File 'lib/testcentricity_web/environment.rb', line 43
def signed_in
@signed_in
end
|
#test_environment ⇒ Object
Returns the value of attribute test_environment.
29
30
31
|
# File 'lib/testcentricity_web/environment.rb', line 29
def test_environment
@test_environment
end
|
#tunneling ⇒ Object
Returns the value of attribute tunneling.
41
42
43
|
# File 'lib/testcentricity_web/environment.rb', line 41
def tunneling
@tunneling
end
|
Returns the value of attribute user_id.
51
52
53
|
# File 'lib/testcentricity_web/environment.rb', line 51
def user_id
@user_id
end
|
Class Method Details
109
110
111
|
# File 'lib/testcentricity_web/environment.rb', line 109
def self.browser
@browser
end
|
.browser=(browser) ⇒ Object
105
106
107
|
# File 'lib/testcentricity_web/environment.rb', line 105
def self.browser=(browser)
@browser = browser.downcase.to_sym
end
|
.browser_size ⇒ Object
117
118
119
|
# File 'lib/testcentricity_web/environment.rb', line 117
def self.browser_size
@browser_size
end
|
.browser_size=(size) ⇒ Object
113
114
115
|
# File 'lib/testcentricity_web/environment.rb', line 113
def self.browser_size=(size)
@browser_size = size
end
|
153
154
155
|
# File 'lib/testcentricity_web/environment.rb', line 153
def self.device
@device
end
|
.device=(device) ⇒ Object
149
150
151
|
# File 'lib/testcentricity_web/environment.rb', line 149
def self.device=(device)
@device = device
end
|
.device_name ⇒ Object
187
188
189
|
# File 'lib/testcentricity_web/environment.rb', line 187
def self.device_name
@device_name
end
|
.device_name=(name) ⇒ Object
183
184
185
|
# File 'lib/testcentricity_web/environment.rb', line 183
def self.device_name=(name)
@device_name = name
end
|
.device_orientation ⇒ Object
211
212
213
|
# File 'lib/testcentricity_web/environment.rb', line 211
def self.device_orientation
@device_orientation
end
|
.device_orientation=(orientation) ⇒ Object
207
208
209
|
# File 'lib/testcentricity_web/environment.rb', line 207
def self.device_orientation=(orientation)
@device_orientation = orientation.downcase.to_sym
end
|
.device_os ⇒ Object
195
196
197
|
# File 'lib/testcentricity_web/environment.rb', line 195
def self.device_os
@device_os
end
|
.device_os=(os) ⇒ Object
191
192
193
|
# File 'lib/testcentricity_web/environment.rb', line 191
def self.device_os=(os)
@device_os = os.downcase.to_sym
end
|
.device_type ⇒ Object
179
180
181
|
# File 'lib/testcentricity_web/environment.rb', line 179
def self.device_type
@device_type
end
|
.device_type=(type) ⇒ Object
175
176
177
|
# File 'lib/testcentricity_web/environment.rb', line 175
def self.device_type=(type)
@device_type = type.downcase.to_sym
end
|
219
220
221
|
# File 'lib/testcentricity_web/environment.rb', line 219
def self.driver
@driver
end
|
.driver=(type) ⇒ Object
215
216
217
|
# File 'lib/testcentricity_web/environment.rb', line 215
def self.driver=(type)
@driver = type
end
|
.external_page ⇒ Object
289
290
291
|
# File 'lib/testcentricity_web/environment.rb', line 289
def self.external_page
@external_page
end
|
.get_screen_shots ⇒ Object
297
298
299
|
# File 'lib/testcentricity_web/environment.rb', line 297
def self.get_screen_shots
@screen_shots
end
|
.is_android? ⇒ Boolean
203
204
205
|
# File 'lib/testcentricity_web/environment.rb', line 203
def self.is_android?
@device_os == :android
end
|
.is_desktop? ⇒ Boolean
245
246
247
|
# File 'lib/testcentricity_web/environment.rb', line 245
def self.is_desktop?
@platform == :desktop
end
|
.is_device? ⇒ Boolean
157
158
159
|
# File 'lib/testcentricity_web/environment.rb', line 157
def self.is_device?
@device == :device
end
|
.is_ios? ⇒ Boolean
199
200
201
|
# File 'lib/testcentricity_web/environment.rb', line 199
def self.is_ios?
@device_os == :ios
end
|
.is_mobile? ⇒ Boolean
241
242
243
|
# File 'lib/testcentricity_web/environment.rb', line 241
def self.is_mobile?
@platform == :mobile
end
|
.is_signed_in? ⇒ Boolean
253
254
255
|
# File 'lib/testcentricity_web/environment.rb', line 253
def self.is_signed_in?
@signed_in
end
|
.is_simulator? ⇒ Boolean
161
162
163
|
# File 'lib/testcentricity_web/environment.rb', line 161
def self.is_simulator?
@device == :simulator
end
|
.is_web? ⇒ Boolean
165
166
167
|
# File 'lib/testcentricity_web/environment.rb', line 165
def self.is_web?
@device == :web
end
|
139
140
141
|
# File 'lib/testcentricity_web/environment.rb', line 139
def self.os
@os
end
|
135
136
137
|
# File 'lib/testcentricity_web/environment.rb', line 135
def self.os=(os)
@os = os
end
|
237
238
239
|
# File 'lib/testcentricity_web/environment.rb', line 237
def self.platform=(platform)
@platform = platform
end
|
.portal_context ⇒ Object
281
282
283
|
# File 'lib/testcentricity_web/environment.rb', line 281
def self.portal_context
@portal_context
end
|
.portal_context=(portal_context) ⇒ Object
277
278
279
|
# File 'lib/testcentricity_web/environment.rb', line 277
def self.portal_context=(portal_context)
@portal_context = portal_context
end
|
.portal_state ⇒ Object
267
268
269
|
# File 'lib/testcentricity_web/environment.rb', line 267
def self.portal_state
@portal_status
end
|
.portal_state=(portal_state) ⇒ Object
263
264
265
|
# File 'lib/testcentricity_web/environment.rb', line 263
def self.portal_state=(portal_state)
@portal_status = portal_state
end
|
.reset_contexts ⇒ Object
301
302
303
|
# File 'lib/testcentricity_web/environment.rb', line 301
def self.reset_contexts
@screen_shots = []
end
|
.save_screen_shot(screen_shot) ⇒ Object
293
294
295
|
# File 'lib/testcentricity_web/environment.rb', line 293
def self.save_screen_shot(screen_shot)
@screen_shots.push(screen_shot)
end
|
.session_code ⇒ Object
75
76
77
78
79
80
81
|
# File 'lib/testcentricity_web/environment.rb', line 75
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
83
84
85
|
# File 'lib/testcentricity_web/environment.rb', line 83
def self.session_id
@session_id
end
|
.session_state ⇒ Object
125
126
127
|
# File 'lib/testcentricity_web/environment.rb', line 125
def self.session_state
@session_state
end
|
.session_state=(session_state) ⇒ Object
121
122
123
|
# File 'lib/testcentricity_web/environment.rb', line 121
def self.session_state=(session_state)
@session_state = session_state
end
|
.session_time_stamp ⇒ Object
87
88
89
|
# File 'lib/testcentricity_web/environment.rb', line 87
def self.session_time_stamp
@session_time_stamp
end
|
.set_browser(browser) ⇒ Object
100
101
102
103
|
# File 'lib/testcentricity_web/environment.rb', line 100
def self.set_browser(browser)
warn "[DEPRECATION] 'TestCentricity::Environ.set_browser' is deprecated. Please use 'Environ.browser =' instead."
@browser = browser.downcase.to_sym
end
|
.set_device(device) ⇒ Object
144
145
146
147
|
# File 'lib/testcentricity_web/environment.rb', line 144
def self.set_device(device)
warn "[DEPRECATION] 'TestCentricity::Environ.set_device' is deprecated. Please use 'Environ.device =' instead."
@device = device
end
|
.set_device_type(type) ⇒ Object
170
171
172
173
|
# File 'lib/testcentricity_web/environment.rb', line 170
def self.set_device_type(type)
warn "[DEPRECATION] 'TestCentricity::Environ.set_device_type' is deprecated. Please use 'Environ.device_type =' instead."
@device_type = type.downcase
end
|
.set_external_page(state) ⇒ Object
285
286
287
|
# File 'lib/testcentricity_web/environment.rb', line 285
def self.set_external_page(state)
@external_page = state
end
|
.set_os(os) ⇒ Object
130
131
132
133
|
# File 'lib/testcentricity_web/environment.rb', line 130
def self.set_os(os)
warn "[DEPRECATION] 'TestCentricity::Environ.set_os' is deprecated. Please use 'Environ.os =' instead."
@os = os
end
|
232
233
234
235
|
# File 'lib/testcentricity_web/environment.rb', line 232
def self.set_platform(platform)
warn "[DEPRECATION] 'TestCentricity::Environ.set_platform' is deprecated. Please use 'Environ.platform =' instead."
@platform = platform
end
|
.set_portal_context(portal_context) ⇒ Object
272
273
274
275
|
# File 'lib/testcentricity_web/environment.rb', line 272
def self.set_portal_context(portal_context)
warn "[DEPRECATION] 'TestCentricity::Environ.set_portal_context' is deprecated. Please use 'Environ.portal_context =' instead."
@portal_context = portal_context
end
|
.set_portal_state(portal_state) ⇒ Object
Deprecated. Please use #portal_state= instead
258
259
260
261
|
# File 'lib/testcentricity_web/environment.rb', line 258
def self.set_portal_state(portal_state)
warn "[DEPRECATION] 'TestCentricity::Environ.set_portal_state' is deprecated. Please use 'Environ.portal_state =' instead."
@portal_status = portal_state
end
|
.set_signed_in(signed_in) ⇒ Object
249
250
251
|
# File 'lib/testcentricity_web/environment.rb', line 249
def self.set_signed_in(signed_in)
@signed_in = signed_in
end
|
.test_environment ⇒ Object
91
92
93
94
95
96
97
|
# File 'lib/testcentricity_web/environment.rb', line 91
def self.test_environment
if @test_environment.blank?
nil
else
@test_environment.downcase.to_sym
end
end
|
.tunneling ⇒ Object
227
228
229
|
# File 'lib/testcentricity_web/environment.rb', line 227
def self.tunneling
@tunneling
end
|
.tunneling=(state) ⇒ Object
223
224
225
|
# File 'lib/testcentricity_web/environment.rb', line 223
def self.tunneling=(state)
@tunneling = state
end
|