Class: CloudTest::Lambdatest
- Inherits:
-
Core
- Object
- Core
- CloudTest::Lambdatest
show all
- Defined in:
- lib/cloud_test/lambdatest.rb
Constant Summary
collapse
- SERVER =
'hub.lambdatest.com/wd/hub'
- DASHBOARD_LINK =
"https://automation.lambdatest.com/"
Constants inherited
from Core
Core::CONFIG_NAME
Class Method Summary
collapse
Methods inherited from Core
check_if_input_is_valid?, copy_keys, get_default_caps, get_provider_class, list_dashboard_link, list_these_caps, load_config, merge_caps, register_driver, upload_status
Class Method Details
.get_all_caps ⇒ Object
54
55
56
57
58
|
# File 'lib/cloud_test/lambdatest.rb', line 54
def self.get_all_caps
!@caps.nil? && @caps.keys > 0 || init()
puts "Capabilities: "
list_these_caps @caps
end
|
.init(config = nil) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/cloud_test/lambdatest.rb', line 7
def self.init(config=nil)
@config = config || load_config('LT_USERNAME', 'LT_ACCESS_KEY')
@caps = Core.get_default_caps
@caps['tunnel'] = true
@caps['visual'] = true
@caps['javascriptEnabled'] = true
@caps['webStorageEnabled'] = true
@caps['acceptSslCerts'] = true
@caps['acceptInsecureCerts'] = true
@caps['network'] = true
@caps['os'] = '10'
@caps['platform'] = 'WINDOWS'
@caps['browserName'] = 'CHROME'
@caps['version'] = '72'
@caps = merge_caps(@caps, @config, 'lambdatest')
if !config.nil?
start()
end
end
|
.list_caps ⇒ Object
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/cloud_test/lambdatest.rb', line 41
def self.list_caps
Core.list_caps
puts "Lambdatest specific defaults:"
puts "\ttunnel: true"
puts "\tvisual: true"
puts "\tjavascriptEnabled: true"
puts "\twebStorageEnabled: true"
puts "\tacceptSslCerts: true"
puts "\tacceptInsecureCerts: true"
puts "\tnetwork: true"
puts 'You can find a caps generator here: https://www.lambdatest.com/capabilities-generator/'
end
|
.start ⇒ Object
30
31
32
33
34
35
36
37
38
|
# File 'lib/cloud_test/lambdatest.rb', line 30
def self.start
puts '> Running features on lambdatest.com'
register_driver(@caps, @config['user'], @config['key'], SERVER)
Capybara.app_host = 'https://localhost.lambdatest.com:4504'
Capybara.server_port = 4504
puts 'Capybara.app_host = "https://localhost.lambdatest.com:4504"'
end
|