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.
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/testcentricity/data_objects/environment.rb', line 66
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']
@ios_app_path = data['IOS_APP_PATH']
@ios_ipa_path = data['IOS_IPA_PATH']
@android_apk_path = data['ANDROID_APK_PATH']
super
end
|
Instance Attribute Details
#android_apk_path ⇒ Object
Returns the value of attribute android_apk_path.
64
65
66
|
# File 'lib/testcentricity/data_objects/environment.rb', line 64
def android_apk_path
@android_apk_path
end
|
Returns the value of attribute append.
56
57
58
|
# File 'lib/testcentricity/data_objects/environment.rb', line 56
def append
@append
end
|
Returns the value of attribute base_url.
53
54
55
|
# File 'lib/testcentricity/data_objects/environment.rb', line 53
def base_url
@base_url
end
|
Returns the value of attribute browser.
30
31
32
|
# File 'lib/testcentricity/data_objects/environment.rb', line 30
def browser
@browser
end
|
#browser_size ⇒ Object
Returns the value of attribute browser_size.
31
32
33
|
# File 'lib/testcentricity/data_objects/environment.rb', line 31
def browser_size
@browser_size
end
|
#db_password ⇒ Object
Returns the value of attribute db_password.
61
62
63
|
# File 'lib/testcentricity/data_objects/environment.rb', line 61
def db_password
@db_password
end
|
#db_username ⇒ Object
Returns the value of attribute db_username.
60
61
62
|
# File 'lib/testcentricity/data_objects/environment.rb', line 60
def db_username
@db_username
end
|
#default_max_wait_time ⇒ Object
Returns the value of attribute default_max_wait_time.
49
50
51
|
# File 'lib/testcentricity/data_objects/environment.rb', line 49
def default_max_wait_time
@default_max_wait_time
end
|
Returns the value of attribute device.
34
35
36
|
# File 'lib/testcentricity/data_objects/environment.rb', line 34
def device
@device
end
|
#device_name ⇒ Object
Returns the value of attribute device_name.
35
36
37
|
# File 'lib/testcentricity/data_objects/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/data_objects/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/data_objects/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/data_objects/environment.rb', line 36
def device_type
@device_type
end
|
Returns the value of attribute dns.
59
60
61
|
# File 'lib/testcentricity/data_objects/environment.rb', line 59
def dns
@dns
end
|
Returns the value of attribute driver.
41
42
43
|
# File 'lib/testcentricity/data_objects/environment.rb', line 41
def driver
@driver
end
|
#external_page ⇒ Object
Returns the value of attribute external_page.
47
48
49
|
# File 'lib/testcentricity/data_objects/environment.rb', line 47
def external_page
@external_page
end
|
Returns the value of attribute hostname.
52
53
54
|
# File 'lib/testcentricity/data_objects/environment.rb', line 52
def hostname
@hostname
end
|
#ios_app_path ⇒ Object
Returns the value of attribute ios_app_path.
62
63
64
|
# File 'lib/testcentricity/data_objects/environment.rb', line 62
def ios_app_path
@ios_app_path
end
|
#ios_ipa_path ⇒ Object
Returns the value of attribute ios_ipa_path.
63
64
65
|
# File 'lib/testcentricity/data_objects/environment.rb', line 63
def ios_ipa_path
@ios_ipa_path
end
|
Returns the value of attribute option1.
57
58
59
|
# File 'lib/testcentricity/data_objects/environment.rb', line 57
def option1
@option1
end
|
Returns the value of attribute option2.
58
59
60
|
# File 'lib/testcentricity/data_objects/environment.rb', line 58
def option2
@option2
end
|
Returns the value of attribute os.
33
34
35
|
# File 'lib/testcentricity/data_objects/environment.rb', line 33
def os
@os
end
|
Returns the value of attribute password.
55
56
57
|
# File 'lib/testcentricity/data_objects/environment.rb', line 55
def password
@password
end
|
Returns the value of attribute platform.
40
41
42
|
# File 'lib/testcentricity/data_objects/environment.rb', line 40
def platform
@platform
end
|
#portal_context ⇒ Object
Returns the value of attribute portal_context.
46
47
48
|
# File 'lib/testcentricity/data_objects/environment.rb', line 46
def portal_context
@portal_context
end
|
#portal_status ⇒ Object
Returns the value of attribute portal_status.
45
46
47
|
# File 'lib/testcentricity/data_objects/environment.rb', line 45
def portal_status
@portal_status
end
|
Returns the value of attribute protocol.
51
52
53
|
# File 'lib/testcentricity/data_objects/environment.rb', line 51
def protocol
@protocol
end
|
#screen_size ⇒ Object
Returns the value of attribute screen_size.
39
40
41
|
# File 'lib/testcentricity/data_objects/environment.rb', line 39
def screen_size
@screen_size
end
|
#session_state ⇒ Object
Returns the value of attribute session_state.
32
33
34
|
# File 'lib/testcentricity/data_objects/environment.rb', line 32
def session_state
@session_state
end
|
#signed_in ⇒ Object
Returns the value of attribute signed_in.
44
45
46
|
# File 'lib/testcentricity/data_objects/environment.rb', line 44
def signed_in
@signed_in
end
|
#test_environment ⇒ Object
Returns the value of attribute test_environment.
29
30
31
|
# File 'lib/testcentricity/data_objects/environment.rb', line 29
def test_environment
@test_environment
end
|
#tunneling ⇒ Object
Returns the value of attribute tunneling.
42
43
44
|
# File 'lib/testcentricity/data_objects/environment.rb', line 42
def tunneling
@tunneling
end
|
Returns the value of attribute user_id.
54
55
56
|
# File 'lib/testcentricity/data_objects/environment.rb', line 54
def user_id
@user_id
end
|
Class Method Details
122
123
124
|
# File 'lib/testcentricity/data_objects/environment.rb', line 122
def self.browser
@browser
end
|
.browser=(browser) ⇒ Object
118
119
120
|
# File 'lib/testcentricity/data_objects/environment.rb', line 118
def self.browser=(browser)
@browser = browser.downcase.to_sym
end
|
.browser_size ⇒ Object
130
131
132
|
# File 'lib/testcentricity/data_objects/environment.rb', line 130
def self.browser_size
@browser_size
end
|
.browser_size=(size) ⇒ Object
126
127
128
|
# File 'lib/testcentricity/data_objects/environment.rb', line 126
def self.browser_size=(size)
@browser_size = size
end
|
.default_max_wait_time ⇒ Object
114
115
116
|
# File 'lib/testcentricity/data_objects/environment.rb', line 114
def self.default_max_wait_time
@default_max_wait_time
end
|
.default_max_wait_time=(timeout) ⇒ Object
108
109
110
111
112
|
# File 'lib/testcentricity/data_objects/environment.rb', line 108
def self.default_max_wait_time=(timeout)
@default_max_wait_time = timeout
Capybara.default_max_wait_time = timeout if driver == :webdriver
end
|
162
163
164
|
# File 'lib/testcentricity/data_objects/environment.rb', line 162
def self.device
@device
end
|
.device=(device) ⇒ Object
158
159
160
|
# File 'lib/testcentricity/data_objects/environment.rb', line 158
def self.device=(device)
@device = device
end
|
.device_name ⇒ Object
190
191
192
|
# File 'lib/testcentricity/data_objects/environment.rb', line 190
def self.device_name
@device_name
end
|
.device_name=(name) ⇒ Object
186
187
188
|
# File 'lib/testcentricity/data_objects/environment.rb', line 186
def self.device_name=(name)
@device_name = name
end
|
.device_orientation ⇒ Object
214
215
216
|
# File 'lib/testcentricity/data_objects/environment.rb', line 214
def self.device_orientation
@device_orientation
end
|
.device_orientation=(orientation) ⇒ Object
210
211
212
|
# File 'lib/testcentricity/data_objects/environment.rb', line 210
def self.device_orientation=(orientation)
@device_orientation = orientation.downcase.to_sym
end
|
.device_os ⇒ Object
198
199
200
|
# File 'lib/testcentricity/data_objects/environment.rb', line 198
def self.device_os
@device_os
end
|
.device_os=(os) ⇒ Object
194
195
196
|
# File 'lib/testcentricity/data_objects/environment.rb', line 194
def self.device_os=(os)
@device_os = os.downcase.to_sym
end
|
.device_type ⇒ Object
182
183
184
|
# File 'lib/testcentricity/data_objects/environment.rb', line 182
def self.device_type
@device_type
end
|
.device_type=(type) ⇒ Object
178
179
180
|
# File 'lib/testcentricity/data_objects/environment.rb', line 178
def self.device_type=(type)
@device_type = type.downcase.to_sym
end
|
222
223
224
|
# File 'lib/testcentricity/data_objects/environment.rb', line 222
def self.driver
@driver
end
|
.driver=(type) ⇒ Object
218
219
220
|
# File 'lib/testcentricity/data_objects/environment.rb', line 218
def self.driver=(type)
@driver = type
end
|
.external_page ⇒ Object
274
275
276
|
# File 'lib/testcentricity/data_objects/environment.rb', line 274
def self.external_page
@external_page
end
|
.get_screen_shots ⇒ Object
282
283
284
|
# File 'lib/testcentricity/data_objects/environment.rb', line 282
def self.get_screen_shots
@screen_shots
end
|
.is_android? ⇒ Boolean
206
207
208
|
# File 'lib/testcentricity/data_objects/environment.rb', line 206
def self.is_android?
@device_os == :android
end
|
.is_desktop? ⇒ Boolean
242
243
244
|
# File 'lib/testcentricity/data_objects/environment.rb', line 242
def self.is_desktop?
@platform == :desktop
end
|
.is_device? ⇒ Boolean
166
167
168
|
# File 'lib/testcentricity/data_objects/environment.rb', line 166
def self.is_device?
@device == :device
end
|
.is_ios? ⇒ Boolean
202
203
204
|
# File 'lib/testcentricity/data_objects/environment.rb', line 202
def self.is_ios?
@device_os == :ios
end
|
.is_mobile? ⇒ Boolean
238
239
240
|
# File 'lib/testcentricity/data_objects/environment.rb', line 238
def self.is_mobile?
@platform == :mobile
end
|
.is_signed_in? ⇒ Boolean
250
251
252
|
# File 'lib/testcentricity/data_objects/environment.rb', line 250
def self.is_signed_in?
@signed_in
end
|
.is_simulator? ⇒ Boolean
170
171
172
|
# File 'lib/testcentricity/data_objects/environment.rb', line 170
def self.is_simulator?
@device == :simulator
end
|
.is_web? ⇒ Boolean
174
175
176
|
# File 'lib/testcentricity/data_objects/environment.rb', line 174
def self.is_web?
@device == :web
end
|
154
155
156
|
# File 'lib/testcentricity/data_objects/environment.rb', line 154
def self.os
@os
end
|
150
151
152
|
# File 'lib/testcentricity/data_objects/environment.rb', line 150
def self.os=(os)
@os = os
end
|
234
235
236
|
# File 'lib/testcentricity/data_objects/environment.rb', line 234
def self.platform=(platform)
@platform = platform
end
|
.portal_context ⇒ Object
266
267
268
|
# File 'lib/testcentricity/data_objects/environment.rb', line 266
def self.portal_context
@portal_context
end
|
.portal_context=(portal_context) ⇒ Object
262
263
264
|
# File 'lib/testcentricity/data_objects/environment.rb', line 262
def self.portal_context=(portal_context)
@portal_context = portal_context
end
|
.portal_state ⇒ Object
258
259
260
|
# File 'lib/testcentricity/data_objects/environment.rb', line 258
def self.portal_state
@portal_status
end
|
.portal_state=(portal_state) ⇒ Object
254
255
256
|
# File 'lib/testcentricity/data_objects/environment.rb', line 254
def self.portal_state=(portal_state)
@portal_status = portal_state
end
|
.reset_contexts ⇒ Object
286
287
288
|
# File 'lib/testcentricity/data_objects/environment.rb', line 286
def self.reset_contexts
@screen_shots = []
end
|
.save_screen_shot(screen_shot) ⇒ Object
278
279
280
|
# File 'lib/testcentricity/data_objects/environment.rb', line 278
def self.save_screen_shot(screen_shot)
@screen_shots.push(screen_shot)
end
|
.screen_size ⇒ Object
138
139
140
|
# File 'lib/testcentricity/data_objects/environment.rb', line 138
def self.screen_size
@screen_size
end
|
.screen_size=(size) ⇒ Object
134
135
136
|
# File 'lib/testcentricity/data_objects/environment.rb', line 134
def self.screen_size=(size)
@screen_size = size
end
|
.session_code ⇒ Object
84
85
86
87
88
89
90
|
# File 'lib/testcentricity/data_objects/environment.rb', line 84
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
92
93
94
|
# File 'lib/testcentricity/data_objects/environment.rb', line 92
def self.session_id
@session_id
end
|
.session_state ⇒ Object
146
147
148
|
# File 'lib/testcentricity/data_objects/environment.rb', line 146
def self.session_state
@session_state
end
|
.session_state=(session_state) ⇒ Object
142
143
144
|
# File 'lib/testcentricity/data_objects/environment.rb', line 142
def self.session_state=(session_state)
@session_state = session_state
end
|
.session_time_stamp ⇒ Object
96
97
98
|
# File 'lib/testcentricity/data_objects/environment.rb', line 96
def self.session_time_stamp
@session_time_stamp
end
|
.set_external_page(state) ⇒ Object
270
271
272
|
# File 'lib/testcentricity/data_objects/environment.rb', line 270
def self.set_external_page(state)
@external_page = state
end
|
.set_signed_in(signed_in) ⇒ Object
246
247
248
|
# File 'lib/testcentricity/data_objects/environment.rb', line 246
def self.set_signed_in(signed_in)
@signed_in = signed_in
end
|
.test_environment ⇒ Object
100
101
102
103
104
105
106
|
# File 'lib/testcentricity/data_objects/environment.rb', line 100
def self.test_environment
if @test_environment.blank?
nil
else
@test_environment.downcase.to_sym
end
end
|
.tunneling ⇒ Object
230
231
232
|
# File 'lib/testcentricity/data_objects/environment.rb', line 230
def self.tunneling
@tunneling
end
|
.tunneling=(state) ⇒ Object
226
227
228
|
# File 'lib/testcentricity/data_objects/environment.rb', line 226
def self.tunneling=(state)
@tunneling = state
end
|