appium_connect 0.1.5 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/AppiumConnect.rb +8 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9499963c414ccadaed30c8b2b02452dddaccf721
|
4
|
+
data.tar.gz: aa61c1d8b01d16be36fe630405733032a95fcd9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26d713a0e8255d79375b6b3a5e71fe016607f9af466792cb0e7e4aec3477379c64c67fdf98d45a3c45992352c62d90f4dc28d2bae81107248140705794e8b295
|
7
|
+
data.tar.gz: db856f86c9443ce76acfa7f112d199dc1d95ad27002bf6e0b238f03b76159d004a6e280b766ab3ead57e7b1e0e23943980166ce563e0b71d139f873997afa709
|
data/lib/AppiumConnect.rb
CHANGED
@@ -25,6 +25,7 @@ def appium_server_start(**options)
|
|
25
25
|
command << " --selendroid-port #{options[:selendroidPort]}" if options.key?(:selendroidPort)
|
26
26
|
command << " --log #{Dir.pwd}/output/#{options[:log]}" if options.key?(:log)
|
27
27
|
command << " --tmp /tmp/#{options[:tmp]}" if options.key?(:tmp)
|
28
|
+
command << " --chromedriver-port #{options[:cp]}" if options.key?(:cp)
|
28
29
|
Dir.chdir('.') {
|
29
30
|
if Gem::Platform.local.os == 'linux'
|
30
31
|
pid = system('x-terminal-emulator -e ' + command)
|
@@ -43,9 +44,9 @@ def appium_server_start(**options)
|
|
43
44
|
}
|
44
45
|
end
|
45
46
|
|
46
|
-
def generate_node_config(file_name, udid, appium_port, ip, hubIp, platform
|
47
|
+
def generate_node_config(file_name, udid, appium_port, ip, hubIp, platform)
|
47
48
|
f = File.new(Dir.pwd + "/node_configs/#{file_name}", "w")
|
48
|
-
f.write( JSON.generate({ capabilities: [{ udid: udid, browserName: udid, maxInstances: 1, platform: platform, deviceName: udid },{ browserName:
|
49
|
+
f.write( JSON.generate({ capabilities: [{ udid: udid, browserName: udid, maxInstances: 1, platform: platform, deviceName: udid },{ browserName: 'chrome', maxInstances: 1, deviceName: udid, udid: udid, seleniumProtocol: 'WebDriver', platform: platform }],
|
49
50
|
configuration: { cleanUpCycle: 2000, timeout: 180000, registerCycle: 5000, proxy: "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", url: "http://" + ip + ":#{appium_port}/wd/hub",
|
50
51
|
host: ip, port: appium_port, maxSession: 1, register: true, hubPort: 4444, hubHost: hubIp } } ) )
|
51
52
|
f.close
|
@@ -60,7 +61,7 @@ def launch_hub_and_nodes(ip, hubIp)
|
|
60
61
|
ios_devices.size.times do |index|
|
61
62
|
port = 4100 + index
|
62
63
|
config_name = "#{ios_devices[index]["udid"]}.json"
|
63
|
-
generate_node_config config_name, ios_devices[index]["udid"], port, ip, hubIp, 'MAC'
|
64
|
+
generate_node_config config_name, ios_devices[index]["udid"], port, ip, hubIp, 'MAC'
|
64
65
|
node_config = Dir.pwd + '/node_configs/' +"#{config_name}"
|
65
66
|
appium_server_start config: node_config, port: port, udid: ios_devices[index]["udid"], log: "appium-#{ios_devices[index]["udid"]}.log", tmp: ios_devices[index]["udid"]
|
66
67
|
end
|
@@ -73,14 +74,15 @@ def launch_hub_and_nodes(ip, hubIp)
|
|
73
74
|
port = 4000 + index
|
74
75
|
bp = 2250 + index
|
75
76
|
sdp = 5000 + index
|
77
|
+
cp = 6000 + index
|
76
78
|
sdkv = get_device_osv(devices[index]['udid']).strip.to_i
|
77
79
|
config_name = "#{devices[index]["udid"]}.json"
|
78
|
-
generate_node_config config_name, devices[index]["udid"], port, ip, hubIp, 'android'
|
80
|
+
generate_node_config config_name, devices[index]["udid"], port, ip, hubIp, 'android'
|
79
81
|
node_config = Dir.pwd + '/node_configs/' +"#{config_name}"
|
80
82
|
if sdkv === 16 || sdkv === 17
|
81
|
-
appium_server_start config: node_config, port: port, bp: bp, udid: devices[index]["udid"], automationName: "selendroid", selendroidPort: sdp, log: "appium-#{devices[index]["udid"]}.log", tmp: devices[index]["udid"]
|
83
|
+
appium_server_start config: node_config, port: port, bp: bp, udid: devices[index]["udid"], automationName: "selendroid", selendroidPort: sdp, log: "appium-#{devices[index]["udid"]}.log", tmp: devices[index]["udid"], cp: cp
|
82
84
|
else
|
83
|
-
appium_server_start config: node_config, port: port, bp: bp, udid: devices[index]["udid"], log: "appium-#{devices[index]["udid"]}.log", tmp: devices[index]["udid"]
|
85
|
+
appium_server_start config: node_config, port: port, bp: bp, udid: devices[index]["udid"], log: "appium-#{devices[index]["udid"]}.log", tmp: devices[index]["udid"], cp: cp
|
84
86
|
end
|
85
87
|
end
|
86
88
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appium_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Watson
|
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
40
|
version: '0'
|
41
41
|
requirements: []
|
42
42
|
rubyforge_project:
|
43
|
-
rubygems_version: 2.4.
|
43
|
+
rubygems_version: 2.4.6
|
44
44
|
signing_key:
|
45
45
|
specification_version: 4
|
46
46
|
summary: Quickly Connect USB connected device to Selenium Grid
|