testcentricity_web 2.3.12 → 2.3.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/devices/devices.yml +1 -1
- data/lib/testcentricity_web.rb +1 -0
- data/lib/testcentricity_web/appium_server.rb +69 -0
- data/lib/testcentricity_web/page_objects_helper.rb +1 -1
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/webdriver_helper.rb +1 -1
- data/testcentricity_web.gemspec +2 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d2755f36849e6612ba5941ae5bb657c0c897f59
|
4
|
+
data.tar.gz: d6dea5afbb885495a6da0a10e8c0515fcf68d80d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa50b0635c96c78c8d102b9b973dd8b4a39e31412bd192363ced7bd6cd2beaf34108dd5ec4c59a555978c31e6e8c6e52d0165529e9924074e498bac3cf9dbb7c
|
7
|
+
data.tar.gz: 0ebd62231027aa420058d80224e5022f65f45d0861a63468b078073d190b45a475e6498d8c006b7cea91f9766b33547c994f01e0ccf59f09fbfc0b8bdd09e2c6
|
data/README.md
CHANGED
@@ -28,6 +28,15 @@ hosted instances of Chrome, Firefox, Safari, and IE web browsers.
|
|
28
28
|
|
29
29
|
|
30
30
|
## What's New
|
31
|
+
###Version 2.3.14
|
32
|
+
|
33
|
+
* Updated device profiles for iPhone 7 (iOS 10) with MS Edge browser.
|
34
|
+
|
35
|
+
###Version 2.3.13
|
36
|
+
|
37
|
+
* Added `AppiumServer.start`, `AppiumServer.running?`, and `AppiumServer.stop` methods for starting and stopping the Appium Server prior to executing tests on
|
38
|
+
iOS physical devices or simulators, or Android virtual device emulators.
|
39
|
+
|
31
40
|
###Version 2.3.12
|
32
41
|
|
33
42
|
* Added `Environ.is_simulator?` and `Environ.is_web?` methods.
|
data/lib/devices/devices.yml
CHANGED
@@ -77,7 +77,7 @@
|
|
77
77
|
:css_width: 375
|
78
78
|
:css_height: 667
|
79
79
|
:default_orientation: portrait
|
80
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 EdgiOS/41.
|
80
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 EdgiOS/41.10.1.0 Mobile/14G60 Safari/603.3.8"
|
81
81
|
:iphone8:
|
82
82
|
:name: "iPhone 8"
|
83
83
|
:os: ios
|
data/lib/testcentricity_web.rb
CHANGED
@@ -37,6 +37,7 @@ require 'testcentricity_web/web_elements/list_element'
|
|
37
37
|
require 'testcentricity_web/web_elements/list_button'
|
38
38
|
require 'testcentricity_web/web_elements/list_checkbox'
|
39
39
|
require 'testcentricity_web/web_elements/list_radio'
|
40
|
+
require 'testcentricity_web/appium_server'
|
40
41
|
|
41
42
|
|
42
43
|
module TestCentricity
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'childprocess'
|
2
|
+
|
3
|
+
#
|
4
|
+
# This class is designed to start and stop the Appium Server process. In order to use it you must have Appium
|
5
|
+
# and node installed on your computer. You can pass parameters to Appium at startup via the constructor.
|
6
|
+
#
|
7
|
+
module TestCentricity
|
8
|
+
class AppiumServer
|
9
|
+
|
10
|
+
attr_accessor :process
|
11
|
+
|
12
|
+
def initialize(params={})
|
13
|
+
@params = params
|
14
|
+
end
|
15
|
+
|
16
|
+
#
|
17
|
+
# Start the Appium Server
|
18
|
+
#
|
19
|
+
def start
|
20
|
+
# terminate any currently running Appium Server
|
21
|
+
if running?
|
22
|
+
system('killall -9 node')
|
23
|
+
puts 'Terminating existing Appium Server'
|
24
|
+
sleep(5)
|
25
|
+
puts 'Appium Server is being restarted'
|
26
|
+
else
|
27
|
+
puts 'Appium Server is being started'
|
28
|
+
end
|
29
|
+
# start new Appium Server
|
30
|
+
@process = ChildProcess.build(*parameters)
|
31
|
+
process.start
|
32
|
+
# wait until confirmation that Appium Server is running
|
33
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 30)
|
34
|
+
wait.until { running? }
|
35
|
+
puts "Appium Server is running - PID = #{process.pid}"
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Check to see if Appium Server is running
|
40
|
+
#
|
41
|
+
def running?
|
42
|
+
response = nil
|
43
|
+
begin
|
44
|
+
response = Net::HTTP.get_response(URI('http://127.0.0.1:4723/wd/hub/sessions'))
|
45
|
+
rescue
|
46
|
+
end
|
47
|
+
response && response.code_type == Net::HTTPOK
|
48
|
+
end
|
49
|
+
|
50
|
+
#
|
51
|
+
# Stop the Appium Server
|
52
|
+
#
|
53
|
+
def stop
|
54
|
+
process.stop
|
55
|
+
puts 'Appium Server has been terminated'
|
56
|
+
end
|
57
|
+
|
58
|
+
private
|
59
|
+
|
60
|
+
def parameters
|
61
|
+
cmd = ['appium']
|
62
|
+
@params.each do |key, value|
|
63
|
+
cmd << '--' + key.to_s
|
64
|
+
cmd << value.to_s if not value.nil? and value.size > 0
|
65
|
+
end
|
66
|
+
cmd
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -410,6 +410,7 @@ module TestCentricity
|
|
410
410
|
error_message = "#{error_message}\nExpected URL of page was #{page_url}." if defined?(page_url)
|
411
411
|
raise error_message
|
412
412
|
end
|
413
|
+
PageManager.current_page = self
|
413
414
|
end
|
414
415
|
|
415
416
|
def navigate_to; end
|
@@ -428,7 +429,6 @@ module TestCentricity
|
|
428
429
|
navigate_to
|
429
430
|
end
|
430
431
|
verify_page_exists
|
431
|
-
PageManager.current_page = self
|
432
432
|
end
|
433
433
|
|
434
434
|
def verify_page_contains(content)
|
@@ -51,7 +51,7 @@ module TestCentricity
|
|
51
51
|
end
|
52
52
|
|
53
53
|
# set browser window size only if testing with a desktop web browser
|
54
|
-
unless Environ.is_device? || Capybara.current_driver
|
54
|
+
unless Environ.is_device? || [:poltergeist, :appium].include?(Capybara.current_driver)
|
55
55
|
initialize_browser_size
|
56
56
|
end
|
57
57
|
|
data/testcentricity_web.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -190,6 +190,20 @@ dependencies:
|
|
190
190
|
- - ">="
|
191
191
|
- !ruby/object:Gem::Version
|
192
192
|
version: '0'
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: childprocess
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - "~>"
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0.5'
|
200
|
+
type: :runtime
|
201
|
+
prerelease: false
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - "~>"
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '0.5'
|
193
207
|
description: |2-
|
194
208
|
|
195
209
|
The TestCentricity™ Web core generic framework for desktop and mobile web site testing implements a Page Object Model DSL
|
@@ -219,6 +233,7 @@ files:
|
|
219
233
|
- Rakefile
|
220
234
|
- lib/devices/devices.yml
|
221
235
|
- lib/testcentricity_web.rb
|
236
|
+
- lib/testcentricity_web/appium_server.rb
|
222
237
|
- lib/testcentricity_web/browser_helper.rb
|
223
238
|
- lib/testcentricity_web/data_objects_helper.rb
|
224
239
|
- lib/testcentricity_web/drag_drop_helper.rb
|