Class: TestCentricity::Environ
- Defined in:
- lib/testcentricity_web/data_objects/environment.rb
Instance Attribute Summary collapse
-
#a11y_standard ⇒ Object
Returns the value of attribute a11y_standard.
-
#android_apk_path ⇒ Object
Returns the value of attribute android_apk_path.
-
#android_app_id ⇒ Object
Returns the value of attribute android_app_id.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#app_host ⇒ Object
Returns the value of attribute app_host.
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#append ⇒ Object
Returns the value of attribute append.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#browser ⇒ Object
Returns the value of attribute browser.
-
#browser_size ⇒ Object
Returns the value of attribute browser_size.
-
#current ⇒ Object
Returns the value of attribute current.
-
#db_password ⇒ Object
Returns the value of attribute db_password.
-
#db_username ⇒ Object
Returns the value of attribute db_username.
-
#deep_link_prefix ⇒ Object
Returns the value of attribute deep_link_prefix.
-
#default_max_wait_time ⇒ Object
Returns the value of attribute default_max_wait_time.
-
#device ⇒ Object
Returns the value of attribute device.
-
#device_name ⇒ Object
Returns the value of attribute device_name.
-
#device_orientation ⇒ Object
Returns the value of attribute device_orientation.
-
#device_os ⇒ Object
Returns the value of attribute device_os.
-
#device_os_version ⇒ Object
Returns the value of attribute device_os_version.
-
#device_type ⇒ Object
Returns the value of attribute device_type.
-
#dns ⇒ Object
Returns the value of attribute dns.
-
#driver ⇒ Object
Returns the value of attribute driver.
-
#driver_name ⇒ Object
Returns the value of attribute driver_name.
-
#external_page ⇒ Object
Returns the value of attribute external_page.
-
#grid ⇒ Object
Returns the value of attribute grid.
-
#headless ⇒ Object
Returns the value of attribute headless.
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#ios_app_path ⇒ Object
Returns the value of attribute ios_app_path.
-
#ios_bundle_id ⇒ Object
Returns the value of attribute ios_bundle_id.
-
#ios_ipa_path ⇒ Object
Returns the value of attribute ios_ipa_path.
-
#language ⇒ Object
Returns the value of attribute language.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#option1 ⇒ Object
Returns the value of attribute option1.
-
#option2 ⇒ Object
Returns the value of attribute option2.
-
#option3 ⇒ Object
Returns the value of attribute option3.
-
#option4 ⇒ Object
Returns the value of attribute option4.
-
#os ⇒ Object
Returns the value of attribute os.
-
#parallel ⇒ Object
Returns the value of attribute parallel.
-
#password ⇒ Object
Returns the value of attribute password.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#portal_context ⇒ Object
Returns the value of attribute portal_context.
-
#portal_status ⇒ Object
Returns the value of attribute portal_status.
-
#process_num ⇒ Object
Returns the value of attribute process_num.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#screen_size ⇒ Object
Returns the value of attribute screen_size.
-
#session_code ⇒ Object
Returns the value of attribute session_code.
-
#session_state ⇒ Object
Returns the value of attribute session_state.
-
#signed_in ⇒ Object
Returns the value of attribute signed_in.
-
#test_environment ⇒ Object
Returns the value of attribute test_environment.
-
#tunneling ⇒ Object
Returns the value of attribute tunneling.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Class Method Summary collapse
- .app_host ⇒ Object
- .browser ⇒ Object
- .browser=(browser) ⇒ Object
- .browser_size ⇒ Object
- .browser_size=(size) ⇒ Object
- .current ⇒ Object
- .current=(current) ⇒ Object
- .default_max_wait_time ⇒ Object
- .default_max_wait_time=(timeout) ⇒ Object
- .device ⇒ Object
- .device=(device) ⇒ Object
- .device_name ⇒ Object
- .device_name=(name) ⇒ Object
- .device_orientation ⇒ Object
- .device_orientation=(orientation) ⇒ Object
- .device_os ⇒ Object
- .device_os=(os) ⇒ Object
- .device_os_version ⇒ Object
- .device_os_version=(version) ⇒ Object
- .device_type ⇒ Object
- .device_type=(type) ⇒ Object
- .driver ⇒ Object
- .driver=(type) ⇒ Object
- .driver_name ⇒ Object
- .driver_name=(name) ⇒ Object
- .driver_state ⇒ Object
- .external_page ⇒ Object
- .get_screen_shots ⇒ Object
- .grid ⇒ Object
- .grid=(type) ⇒ Object
- .headless ⇒ Object
- .headless=(state) ⇒ Object
- .is_android? ⇒ Boolean
- .is_desktop? ⇒ Boolean
- .is_device? ⇒ Boolean
- .is_ios? ⇒ Boolean
- .is_mobile? ⇒ Boolean
- .is_signed_in? ⇒ Boolean
- .is_simulator? ⇒ Boolean
- .is_web? ⇒ Boolean
- .language ⇒ Object
- .language=(language) ⇒ Object
- .locale ⇒ Object
- .locale=(locale) ⇒ Object
- .os ⇒ Object
- .os=(os) ⇒ Object
- .parallel ⇒ Object
- .parallel=(state) ⇒ Object
- .platform ⇒ Object
- .platform=(platform) ⇒ Object
- .portal_context ⇒ Object
- .portal_context=(portal_context) ⇒ Object
- .portal_state ⇒ Object
- .portal_state=(portal_state) ⇒ Object
- .process_num ⇒ Object
- .process_num=(num) ⇒ Object
- .report_header ⇒ Object
- .reset_contexts ⇒ Object
- .restore_driver_state(driver_state) ⇒ Object
- .save_screen_shot(screen_shot) ⇒ Object
- .screen_size ⇒ Object
- .screen_size=(size) ⇒ Object
- .session_code ⇒ Object
- .session_id ⇒ Object
- .session_state ⇒ Object
- .session_state=(session_state) ⇒ Object
- .session_time_stamp ⇒ Object
- .set_external_page(state) ⇒ Object
- .set_signed_in(signed_in) ⇒ Object
- .test_environment ⇒ Object
- .tunneling ⇒ Object
- .tunneling=(state) ⇒ Object
Instance Method Summary collapse
-
#initialize(data) ⇒ Environ
constructor
A new instance of Environ.
Constructor Details
#initialize(data) ⇒ Environ
Returns a new instance of Environ.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 120 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'] @ios_app_path = data['IOS_APP_PATH'] @ios_ipa_path = data['IOS_IPA_PATH'] @android_apk_path = data['ANDROID_APK_PATH'] @deep_link_prefix = data['DEEP_LINK_PREFIX'] @ios_bundle_id = data['IOS_BUNDLE_ID'] @android_app_id = data['ANDROID_APP_ID'] @a11y_standard = ENV['ACCESSIBILITY_STANDARD'] || 'best-practice' url = @hostname.blank? ? "#{@base_url}#{@append}" : "#{@hostname}/#{@base_url}#{@append}" @app_host = if @user_id.blank? || @password.blank? "#{@protocol}://#{url}" else "#{@protocol}://#{@user_id}:#{@password}@#{url}" end end |
Instance Attribute Details
#a11y_standard ⇒ Object
Returns the value of attribute a11y_standard.
95 96 97 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 95 def a11y_standard @a11y_standard end |
#android_apk_path ⇒ Object
Returns the value of attribute android_apk_path.
114 115 116 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 114 def android_apk_path @android_apk_path end |
#android_app_id ⇒ Object
Returns the value of attribute android_app_id.
118 119 120 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 118 def android_app_id @android_app_id end |
#api_key ⇒ Object
Returns the value of attribute api_key.
104 105 106 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 104 def api_key @api_key end |
#app_host ⇒ Object
Returns the value of attribute app_host.
66 67 68 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 66 def app_host @app_host end |
#app_id ⇒ Object
Returns the value of attribute app_id.
103 104 105 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 103 def app_id @app_id end |
#append ⇒ Object
Returns the value of attribute append.
102 103 104 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 102 def append @append end |
#base_url ⇒ Object
Returns the value of attribute base_url.
99 100 101 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 99 def base_url @base_url end |
#browser ⇒ Object
Returns the value of attribute browser.
67 68 69 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 67 def browser @browser end |
#browser_size ⇒ Object
Returns the value of attribute browser_size.
68 69 70 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 68 def browser_size @browser_size end |
#current ⇒ Object
Returns the value of attribute current.
64 65 66 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 64 def current @current end |
#db_password ⇒ Object
Returns the value of attribute db_password.
111 112 113 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 111 def db_password @db_password end |
#db_username ⇒ Object
Returns the value of attribute db_username.
110 111 112 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 110 def db_username @db_username end |
#deep_link_prefix ⇒ Object
Returns the value of attribute deep_link_prefix.
116 117 118 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 116 def deep_link_prefix @deep_link_prefix end |
#default_max_wait_time ⇒ Object
Returns the value of attribute default_max_wait_time.
115 116 117 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 115 def default_max_wait_time @default_max_wait_time end |
#device ⇒ Object
Returns the value of attribute device.
73 74 75 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 73 def device @device end |
#device_name ⇒ Object
Returns the value of attribute device_name.
74 75 76 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 74 def device_name @device_name end |
#device_orientation ⇒ Object
Returns the value of attribute device_orientation.
78 79 80 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 78 def device_orientation @device_orientation end |
#device_os ⇒ Object
Returns the value of attribute device_os.
76 77 78 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 76 def device_os @device_os end |
#device_os_version ⇒ Object
Returns the value of attribute device_os_version.
77 78 79 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 77 def device_os_version @device_os_version end |
#device_type ⇒ Object
Returns the value of attribute device_type.
75 76 77 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 75 def device_type @device_type end |
#dns ⇒ Object
Returns the value of attribute dns.
109 110 111 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 109 def dns @dns end |
#driver ⇒ Object
Returns the value of attribute driver.
81 82 83 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 81 def driver @driver end |
#driver_name ⇒ Object
Returns the value of attribute driver_name.
82 83 84 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 82 def driver_name @driver_name end |
#external_page ⇒ Object
Returns the value of attribute external_page.
94 95 96 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 94 def external_page @external_page end |
#grid ⇒ Object
Returns the value of attribute grid.
83 84 85 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 83 def grid @grid end |
#headless ⇒ Object
Returns the value of attribute headless.
69 70 71 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 69 def headless @headless end |
#hostname ⇒ Object
Returns the value of attribute hostname.
98 99 100 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 98 def hostname @hostname end |
#ios_app_path ⇒ Object
Returns the value of attribute ios_app_path.
112 113 114 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 112 def ios_app_path @ios_app_path end |
#ios_bundle_id ⇒ Object
Returns the value of attribute ios_bundle_id.
117 118 119 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 117 def ios_bundle_id @ios_bundle_id end |
#ios_ipa_path ⇒ Object
Returns the value of attribute ios_ipa_path.
113 114 115 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 113 def ios_ipa_path @ios_ipa_path end |
#language ⇒ Object
Returns the value of attribute language.
86 87 88 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 86 def language @language end |
#locale ⇒ Object
Returns the value of attribute locale.
85 86 87 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 85 def locale @locale end |
#option1 ⇒ Object
Returns the value of attribute option1.
105 106 107 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 105 def option1 @option1 end |
#option2 ⇒ Object
Returns the value of attribute option2.
106 107 108 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 106 def option2 @option2 end |
#option3 ⇒ Object
Returns the value of attribute option3.
107 108 109 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 107 def option3 @option3 end |
#option4 ⇒ Object
Returns the value of attribute option4.
108 109 110 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 108 def option4 @option4 end |
#os ⇒ Object
Returns the value of attribute os.
72 73 74 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 72 def os @os end |
#parallel ⇒ Object
Returns the value of attribute parallel.
88 89 90 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 88 def parallel @parallel end |
#password ⇒ Object
Returns the value of attribute password.
101 102 103 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 101 def password @password end |
#platform ⇒ Object
Returns the value of attribute platform.
80 81 82 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 80 def platform @platform end |
#portal_context ⇒ Object
Returns the value of attribute portal_context.
93 94 95 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 93 def portal_context @portal_context end |
#portal_status ⇒ Object
Returns the value of attribute portal_status.
92 93 94 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 92 def portal_status @portal_status end |
#process_num ⇒ Object
Returns the value of attribute process_num.
89 90 91 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 89 def process_num @process_num end |
#protocol ⇒ Object
Returns the value of attribute protocol.
97 98 99 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 97 def protocol @protocol end |
#screen_size ⇒ Object
Returns the value of attribute screen_size.
79 80 81 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 79 def screen_size @screen_size end |
#session_code ⇒ Object
Returns the value of attribute session_code.
71 72 73 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 71 def session_code @session_code end |
#session_state ⇒ Object
Returns the value of attribute session_state.
70 71 72 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 70 def session_state @session_state end |
#signed_in ⇒ Object
Returns the value of attribute signed_in.
91 92 93 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 91 def signed_in @signed_in end |
#test_environment ⇒ Object
Returns the value of attribute test_environment.
65 66 67 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 65 def test_environment @test_environment end |
#tunneling ⇒ Object
Returns the value of attribute tunneling.
84 85 86 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 84 def tunneling @tunneling end |
#user_id ⇒ Object
Returns the value of attribute user_id.
100 101 102 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 100 def user_id @user_id end |
Class Method Details
.app_host ⇒ Object
199 200 201 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 199 def self.app_host @app_host end |
.browser ⇒ Object
257 258 259 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 257 def self.browser @browser end |
.browser=(browser) ⇒ Object
253 254 255 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 253 def self.browser=(browser) @browser = browser.downcase.to_sym end |
.browser_size ⇒ Object
265 266 267 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 265 def self.browser_size @browser_size end |
.browser_size=(size) ⇒ Object
261 262 263 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 261 def self.browser_size=(size) @browser_size = size end |
.current ⇒ Object
152 153 154 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 152 def self.current @current end |
.current=(current) ⇒ Object
156 157 158 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 156 def self.current=(current) @current = current end |
.default_max_wait_time ⇒ Object
249 250 251 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 249 def self.default_max_wait_time @default_max_wait_time end |
.default_max_wait_time=(timeout) ⇒ Object
243 244 245 246 247 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 243 def self.default_max_wait_time=(timeout) @default_max_wait_time = timeout Capybara.default_max_wait_time = timeout if driver == :webdriver end |
.device ⇒ Object
297 298 299 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 297 def self.device @device end |
.device=(device) ⇒ Object
293 294 295 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 293 def self.device=(device) @device = device end |
.device_name ⇒ Object
326 327 328 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 326 def self.device_name @device_name end |
.device_name=(name) ⇒ Object
322 323 324 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 322 def self.device_name=(name) @device_name = name end |
.device_orientation ⇒ Object
360 361 362 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 360 def self.device_orientation @device_orientation end |
.device_orientation=(orientation) ⇒ Object
355 356 357 358 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 355 def self.device_orientation=(orientation) orientation = orientation.downcase.to_sym if orientation.is_a?(String) @device_orientation = orientation end |
.device_os ⇒ Object
335 336 337 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 335 def self.device_os @device_os end |
.device_os=(os) ⇒ Object
330 331 332 333 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 330 def self.device_os=(os) os = os.downcase.to_sym if os.is_a?(String) @device_os = os end |
.device_os_version ⇒ Object
343 344 345 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 343 def self.device_os_version @device_os_version end |
.device_os_version=(version) ⇒ Object
339 340 341 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 339 def self.device_os_version=(version) @device_os_version = version end |
.device_type ⇒ Object
318 319 320 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 318 def self.device_type @device_type end |
.device_type=(type) ⇒ Object
313 314 315 316 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 313 def self.device_type=(type) type = type.downcase.to_sym if type.is_a?(String) @device_type = type end |
.driver ⇒ Object
376 377 378 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 376 def self.driver @driver end |
.driver=(type) ⇒ Object
372 373 374 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 372 def self.driver=(type) @driver = type end |
.driver_name ⇒ Object
385 386 387 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 385 def self.driver_name @driver_name end |
.driver_name=(name) ⇒ Object
380 381 382 383 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 380 def self.driver_name=(name) name = name.gsub(/\s+/, '_').downcase.to_sym if name.is_a?(String) @driver_name = name end |
.driver_state ⇒ Object
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 160 def self.driver_state { driver_name: @driver_name, driver: @driver, app_host: @app_host, browser: @browser, browser_size: @browser_size, headless: @headless, os: @os, device: @device, device_name: @device_name, device_type: @device_type, device_os: @device_os, device_os_version: @device_os_version, device_orientation: @device_orientation, platform: @platform, grid: @grid, tunneling: @tunneling } end |
.external_page ⇒ Object
465 466 467 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 465 def self.external_page @external_page end |
.get_screen_shots ⇒ Object
473 474 475 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 473 def self.get_screen_shots @screen_shots end |
.grid ⇒ Object
393 394 395 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 393 def self.grid @grid end |
.grid=(type) ⇒ Object
389 390 391 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 389 def self.grid=(type) @grid = type end |
.headless ⇒ Object
273 274 275 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 273 def self.headless @headless end |
.headless=(state) ⇒ Object
269 270 271 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 269 def self.headless=(state) @headless = state end |
.is_android? ⇒ Boolean
351 352 353 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 351 def self.is_android? @device_os == :android end |
.is_desktop? ⇒ Boolean
433 434 435 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 433 def self.is_desktop? @platform == :desktop end |
.is_device? ⇒ Boolean
301 302 303 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 301 def self.is_device? @device == :device end |
.is_ios? ⇒ Boolean
347 348 349 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 347 def self.is_ios? @device_os == :ios end |
.is_mobile? ⇒ Boolean
429 430 431 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 429 def self.is_mobile? @platform == :mobile end |
.is_signed_in? ⇒ Boolean
441 442 443 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 441 def self.is_signed_in? @signed_in end |
.is_simulator? ⇒ Boolean
305 306 307 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 305 def self.is_simulator? @device == :simulator end |
.is_web? ⇒ Boolean
309 310 311 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 309 def self.is_web? @device == :web end |
.language ⇒ Object
409 410 411 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 409 def self.language @language end |
.language=(language) ⇒ Object
405 406 407 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 405 def self.language=(language) @language = language end |
.locale ⇒ Object
417 418 419 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 417 def self.locale @locale end |
.locale=(locale) ⇒ Object
413 414 415 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 413 def self.locale=(locale) @locale = locale end |
.os ⇒ Object
289 290 291 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 289 def self.os @os end |
.os=(os) ⇒ Object
285 286 287 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 285 def self.os=(os) @os = os end |
.parallel ⇒ Object
223 224 225 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 223 def self.parallel @parallel end |
.parallel=(state) ⇒ Object
219 220 221 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 219 def self.parallel=(state) @parallel = state end |
.platform ⇒ Object
425 426 427 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 425 def self.platform @platform end |
.platform=(platform) ⇒ Object
421 422 423 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 421 def self.platform=(platform) @platform = platform end |
.portal_context ⇒ Object
457 458 459 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 457 def self.portal_context @portal_context end |
.portal_context=(portal_context) ⇒ Object
453 454 455 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 453 def self.portal_context=(portal_context) @portal_context = portal_context end |
.portal_state ⇒ Object
449 450 451 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 449 def self.portal_state @portal_status end |
.portal_state=(portal_state) ⇒ Object
445 446 447 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 445 def self.portal_state=(portal_state) @portal_status = portal_state end |
.process_num ⇒ Object
231 232 233 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 231 def self.process_num @process_num end |
.process_num=(num) ⇒ Object
227 228 229 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 227 def self.process_num=(num) @process_num = num end |
.report_header ⇒ Object
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 481 def self.report_header report_header = "\n<b><u>TEST ENVIRONMENT</u>:</b> #{ENV['TEST_ENVIRONMENT']}\n" report_header = "#{report_header} <b>Browser:</b>\t #{@browser.capitalize}\n" if @browser report_header = "#{report_header} <b>Device:</b>\t #{@device_name}\n" if @device_name report_header = "#{report_header} <b>Device OS:</b>\t #{@device_os} #{@device_os_version}\n" if @device_os report_header = "#{report_header} <b>Device type:</b>\t #{@device_type}\n" if @device_type report_header = "#{report_header} <b>Driver:</b>\t #{@driver}\n" if @driver report_header = "#{report_header} <b>Grid:</b>\t\t #{@grid}\n" if @grid report_header = "#{report_header} <b>OS:</b>\t\t #{@os}\n" if @os report_header = "#{report_header} <b>Locale:</b>\t #{@locale}\n" if @locale report_header = "#{report_header} <b>Language:</b>\t #{@language}\n" if @language report_header = "#{report_header} <b>Country:</b>\t #{ENV['COUNTRY']}\n" if ENV['COUNTRY'] report_header = "#{report_header} <b>WCAG Accessibility Standard:</b>\t #{ENV['ACCESSIBILITY_STANDARD']}\n" if ENV['ACCESSIBILITY_STANDARD'] "#{report_header}\n\n" end |
.reset_contexts ⇒ Object
477 478 479 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 477 def self.reset_contexts @screen_shots = [] end |
.restore_driver_state(driver_state) ⇒ Object
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 181 def self.restore_driver_state(driver_state) @driver = driver_state[:driver] @app_host = driver_state[:app_host] @browser = driver_state[:browser] @browser_size = driver_state[:browser_size] @headless = driver_state[:headless] @os = driver_state[:os] @device = driver_state[:device] @device_name = driver_state[:device_name] @device_type = driver_state[:device_type] @device_os = driver_state[:device_os] @device_os_version = driver_state[:device_os_version] @device_orientation = driver_state[:device_orientation] @platform = driver_state[:platform] @grid = driver_state[:grid] @tunneling = driver_state[:tunneling] end |
.save_screen_shot(screen_shot) ⇒ Object
469 470 471 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 469 def self.save_screen_shot(screen_shot) @screen_shots.push(screen_shot) end |
.screen_size ⇒ Object
368 369 370 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 368 def self.screen_size @screen_size end |
.screen_size=(size) ⇒ Object
364 365 366 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 364 def self.screen_size=(size) @screen_size = size end |
.session_code ⇒ Object
203 204 205 206 207 208 209 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 203 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
211 212 213 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 211 def self.session_id @session_id end |
.session_state ⇒ Object
281 282 283 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 281 def self.session_state @session_state end |
.session_state=(session_state) ⇒ Object
277 278 279 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 277 def self.session_state=(session_state) @session_state = session_state end |
.session_time_stamp ⇒ Object
215 216 217 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 215 def self.session_time_stamp @session_time_stamp end |
.set_external_page(state) ⇒ Object
461 462 463 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 461 def self.set_external_page(state) @external_page = state end |
.set_signed_in(signed_in) ⇒ Object
437 438 439 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 437 def self.set_signed_in(signed_in) @signed_in = signed_in end |
.test_environment ⇒ Object
235 236 237 238 239 240 241 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 235 def self.test_environment if @test_environment.blank? nil else @test_environment.downcase.to_sym end end |
.tunneling ⇒ Object
401 402 403 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 401 def self.tunneling @tunneling end |
.tunneling=(state) ⇒ Object
397 398 399 |
# File 'lib/testcentricity_web/data_objects/environment.rb', line 397 def self.tunneling=(state) @tunneling = state end |