class TestCentricity::Environ
Attributes
android_apk_path[RW]
append[RW]
base_url[RW]
browser[RW]
browser_size[RW]
db_password[RW]
db_username[RW]
default_max_wait_time[RW]
device[RW]
device_name[RW]
device_orientation[RW]
device_os[RW]
device_type[RW]
dns[RW]
driver[RW]
external_page[RW]
hostname[RW]
ios_app_path[RW]
ios_ipa_path[RW]
option1[RW]
option2[RW]
os[RW]
password[RW]
platform[RW]
portal_context[RW]
portal_status[RW]
protocol[RW]
screen_size[RW]
session_state[RW]
signed_in[RW]
test_environment[RW]
tunneling[RW]
user_id[RW]
Public Class Methods
browser()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 122 def self.browser @browser end
browser=(browser)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 118 def self.browser=(browser) @browser = browser.downcase.to_sym end
browser_size()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 130 def self.browser_size @browser_size end
browser_size=(size)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 126 def self.browser_size=(size) @browser_size = size end
default_max_wait_time()
click to toggle source
# 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)
click to toggle source
# 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
device()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 162 def self.device @device end
device=(device)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 158 def self.device=(device) @device = device end
device_name()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 190 def self.device_name @device_name end
device_name=(name)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 186 def self.device_name=(name) @device_name = name end
device_orientation()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 214 def self.device_orientation @device_orientation end
device_orientation=(orientation)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 210 def self.device_orientation=(orientation) @device_orientation = orientation.downcase.to_sym end
device_os()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 198 def self.device_os @device_os end
device_os=(os)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 194 def self.device_os=(os) @device_os = os.downcase.to_sym end
device_type()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 182 def self.device_type @device_type end
device_type=(type)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 178 def self.device_type=(type) @device_type = type.downcase.to_sym end
driver()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 222 def self.driver @driver end
driver=(type)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 218 def self.driver=(type) @driver = type end
external_page()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 274 def self.external_page @external_page end
get_screen_shots()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 282 def self.get_screen_shots @screen_shots end
is_android?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 206 def self.is_android? @device_os == :android end
is_desktop?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 242 def self.is_desktop? @platform == :desktop end
is_device?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 166 def self.is_device? @device == :device end
is_ios?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 202 def self.is_ios? @device_os == :ios end
is_mobile?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 238 def self.is_mobile? @platform == :mobile end
is_signed_in?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 250 def self.is_signed_in? @signed_in end
is_simulator?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 170 def self.is_simulator? @device == :simulator end
is_web?()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 174 def self.is_web? @device == :web end
new(data)
click to toggle source
Calls superclass method
TestCentricity::DataObject::new
# 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
os()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 154 def self.os @os end
os=(os)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 150 def self.os=(os) @os = os end
platform=(platform)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 234 def self.platform=(platform) @platform = platform end
portal_context()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 266 def self.portal_context @portal_context end
portal_context=(portal_context)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 262 def self.portal_context=(portal_context) @portal_context = portal_context end
portal_state()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 258 def self.portal_state @portal_status end
portal_state=(portal_state)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 254 def self.portal_state=(portal_state) @portal_status = portal_state end
reset_contexts()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 286 def self.reset_contexts @screen_shots = [] end
save_screen_shot(screen_shot)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 278 def self.save_screen_shot(screen_shot) @screen_shots.push(screen_shot) end
screen_size()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 138 def self.screen_size @screen_size end
screen_size=(size)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 134 def self.screen_size=(size) @screen_size = size end
session_code()
click to toggle source
# 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()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 92 def self.session_id @session_id end
session_state()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 146 def self.session_state @session_state end
session_state=(session_state)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 142 def self.session_state=(session_state) @session_state = session_state end
session_time_stamp()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 96 def self.session_time_stamp @session_time_stamp end
set_external_page(state)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 270 def self.set_external_page(state) @external_page = state end
set_signed_in(signed_in)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 246 def self.set_signed_in(signed_in) @signed_in = signed_in end
test_environment()
click to toggle source
# 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()
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 230 def self.tunneling @tunneling end
tunneling=(state)
click to toggle source
# File lib/testcentricity/data_objects/environment.rb, line 226 def self.tunneling=(state) @tunneling = state end