RDee 0.3 → 0.4
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/.gitignore +1 -0
- data/ChangeLog +7 -0
- data/README.md +10 -2
- data/features/environment_variable.feature +6 -1
- data/features/local_browsers.feature +6 -2
- data/features/mobile_remote.feature +18 -1
- data/features/remote_browsers.feature +18 -5
- data/lib/rdee.rb +2 -0
- data/lib/rdee/additional_options.rb +35 -0
- data/lib/rdee/browser_factory.rb +5 -38
- data/lib/rdee/desired_capabilities.rb +14 -0
- data/lib/rdee/target_parser.rb +18 -14
- data/lib/rdee/version.rb +1 -1
- data/spec/lib/rd_spec.rb +5 -5
- data/spec/lib/target_parser_spec.rb +8 -3
- data/spec/lib/targets_spec.rb +24 -4
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ddc2af143bf017104810f95d5b674af152e7fdaf
|
|
4
|
+
data.tar.gz: 121b358d8be9e3ba33194c15cbbecbc1201eba96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5af5672699a6d69f42eeedde245f1a00d49a71b6358faf1008841cc7991e227e54629e179ce9a2e229c59050532840265585df6d52bdcee2e57775b438df1341
|
|
7
|
+
data.tar.gz: d359d90e0d09aa3fdbe0e16bf5a941f5cdc20718536b40c6c2736a4dd3c7df72aa61fb743b943707d507f8143345b98cffb6ab21ab7404762d1d53406769aa65
|
data/.gitignore
CHANGED
data/ChangeLog
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
=== Release 0.4 / 15 October 2016
|
|
2
|
+
* Enhancements
|
|
3
|
+
* Added support for Yosemite
|
|
4
|
+
* Removed support for Snow Lepord
|
|
5
|
+
* Added support for El Capitan
|
|
6
|
+
* Added support for Windows 10
|
|
7
|
+
|
|
1
8
|
=== Release 0.3 / 8-September-2014
|
|
2
9
|
* Enhancements
|
|
3
10
|
* Added iPhone support
|
data/README.md
CHANGED
|
@@ -49,7 +49,7 @@ firefox30_win8
|
|
|
49
49
|
````
|
|
50
50
|
|
|
51
51
|
The first part of the target determines what browser to use. At the current time you can
|
|
52
|
-
specify `firefox`, `chrome`, `ie`, or `
|
|
52
|
+
specify `firefox`, `chrome`, `ie`, `safari`, `phantomjs` or `iphone`. In the near future we will be supporting more
|
|
53
53
|
mobile platforms so stay tuned.
|
|
54
54
|
|
|
55
55
|
Immediately following the browser is the version. This is optional and if you do not specify
|
|
@@ -61,14 +61,22 @@ optional. Currently the following host os values are available:
|
|
|
61
61
|
|
|
62
62
|
| host | description |
|
|
63
63
|
| --- | --- |
|
|
64
|
+
| win10 | Windows 10 |
|
|
64
65
|
| win81 | Windows 8.1 |
|
|
65
66
|
| win8 | Windows 8 |
|
|
66
67
|
| win7 | Windows 7 |
|
|
67
68
|
| winxp | Windows XP |
|
|
68
|
-
| snow_leopard | OS X 10.6 |
|
|
69
69
|
| mountain_lion | OS X 10.8 |
|
|
70
70
|
| mavricks | OS X 10.9 |
|
|
71
|
+
| yosemite | OS X 10.10 |
|
|
72
|
+
| el_capitan | OS X 10.11 |
|
|
71
73
|
| linux | Linux |
|
|
74
|
+
| ios60 | 'OS X 10.8'|
|
|
75
|
+
| ios61 | 'OS X 10.8' |
|
|
76
|
+
| ios70 | 'OS X 10.9' |
|
|
77
|
+
| ios71 | 'OS X 10.9' |
|
|
78
|
+
| ios80 | 'OS X 10.10' |
|
|
79
|
+
| ios81 | 'OS X 10.10' |
|
|
72
80
|
|
|
73
81
|
The host os value is typically used when running the tests on a Selenium Grid. It is up to
|
|
74
82
|
you to ensure that the host and requested browser combination exist on your grid.
|
|
@@ -2,34 +2,39 @@ Feature: RDee should work well with browsers when target is set via environment
|
|
|
2
2
|
|
|
3
3
|
Since I only have a Mac I will test Firefox, Chrome, and Safari
|
|
4
4
|
|
|
5
|
+
@firefox
|
|
5
6
|
Scenario: Creating a Firefox browser with a variable using Selenium
|
|
6
7
|
When I establish a Firefox browser with a variable using Selenium
|
|
7
8
|
Then I should be able to perform a google search for cheezyworld
|
|
8
9
|
And I should be able to close the connection
|
|
9
10
|
|
|
11
|
+
@firefox
|
|
10
12
|
Scenario: Creating a Firefox browser with a variable using Watir
|
|
11
13
|
When I establish a Firefox browser with a variable using Watir
|
|
12
14
|
Then I should be able to perform a google search for cheezyworld
|
|
13
15
|
And I should be able to close the connection
|
|
14
16
|
|
|
17
|
+
@chrome
|
|
15
18
|
Scenario: Creating a Chrome browser with a variable using Selenium
|
|
16
19
|
When I establish a Chrome browser with a variable using Selenium
|
|
17
20
|
Then I should be able to perform a google search for cheezyworld
|
|
18
21
|
And I should be able to close the connection
|
|
19
22
|
|
|
23
|
+
@chrome
|
|
20
24
|
Scenario: Creating a Chrome browser with a variable using Watir
|
|
21
25
|
When I establish a Chrome browser with a variable using Watir
|
|
22
26
|
Then I should be able to perform a google search for cheezyworld
|
|
23
27
|
And I should be able to close the connection
|
|
24
28
|
|
|
29
|
+
@safari
|
|
25
30
|
Scenario: Creating a Safari browser with a variable using Selenium
|
|
26
31
|
When I establish a Safari browser with a variable using Selenium
|
|
27
32
|
Then I should be able to perform a google search for cheezyworld
|
|
28
33
|
And I should be able to close the connection
|
|
29
34
|
|
|
35
|
+
@safari
|
|
30
36
|
Scenario: Creating a Safari browser with a variable using Watir
|
|
31
37
|
When I establish a Safari browser with a variable using Watir
|
|
32
38
|
Then I should be able to perform a google search for cheezyworld
|
|
33
39
|
And I should be able to close the connection
|
|
34
40
|
|
|
35
|
-
|
|
@@ -2,34 +2,38 @@ Feature: RDee should work well with browsers on your local machine
|
|
|
2
2
|
|
|
3
3
|
Since I only have a Mac I will test Firefox, Chrome, and Safari
|
|
4
4
|
|
|
5
|
+
@firefox
|
|
5
6
|
Scenario: Creating a Firefox browser on the local machine using Selenium
|
|
6
7
|
When I establish a Firefox browser on the local machine using Selenium
|
|
7
8
|
Then I should be able to perform a google search for cheezyworld
|
|
8
9
|
And I should be able to close the connection
|
|
9
10
|
|
|
11
|
+
@firefox
|
|
10
12
|
Scenario: Creating a Firefox browser on the local machine using Watir
|
|
11
13
|
When I establish a Firefox browser on the local machine using Watir
|
|
12
14
|
Then I should be able to perform a google search for cheezyworld
|
|
13
15
|
And I should be able to close the connection
|
|
14
16
|
|
|
17
|
+
@chrome
|
|
15
18
|
Scenario: Creating a Chrome browser on the local machine using Selenium
|
|
16
19
|
When I establish a Chrome browser on the local machine using Selenium
|
|
17
20
|
Then I should be able to perform a google search for cheezyworld
|
|
18
21
|
And I should be able to close the connection
|
|
19
22
|
|
|
23
|
+
@chrome
|
|
20
24
|
Scenario: Creating a Chrome browser on the local machine using Watir
|
|
21
25
|
When I establish a Chrome browser on the local machine using Watir
|
|
22
26
|
Then I should be able to perform a google search for cheezyworld
|
|
23
27
|
And I should be able to close the connection
|
|
24
28
|
|
|
29
|
+
@safari
|
|
25
30
|
Scenario: Creating a Safari browser on the local machine using Selenium
|
|
26
31
|
When I establish a Safari browser on the local machine using Selenium
|
|
27
32
|
Then I should be able to perform a google search for cheezyworld
|
|
28
33
|
And I should be able to close the connection
|
|
29
34
|
|
|
35
|
+
@safari
|
|
30
36
|
Scenario: Creating a Safari browser on the local machine using Watir
|
|
31
37
|
When I establish a Safari browser on the local machine using Watir
|
|
32
38
|
Then I should be able to perform a google search for cheezyworld
|
|
33
39
|
And I should be able to close the connection
|
|
34
|
-
|
|
35
|
-
|
|
@@ -1,26 +1,43 @@
|
|
|
1
1
|
Feature: RDee should work well with mobile devices on a remote selenium grid
|
|
2
2
|
|
|
3
|
+
@mobile
|
|
4
|
+
Scenario: Creating an iPhone browser on ios 8.1
|
|
5
|
+
When I establish a iphone_ios81 browser on the remote machine using Selenium
|
|
6
|
+
And I go to the cheezyworld site
|
|
7
|
+
And I select the transformations link
|
|
8
|
+
Then I should see the text "Cucumber Transformations Screencast"
|
|
9
|
+
|
|
10
|
+
@mobile
|
|
11
|
+
Scenario: Creating an iPhone browser on ios 8.0
|
|
12
|
+
When I establish a iphone_ios80 browser on the remote machine using Selenium
|
|
13
|
+
And I go to the cheezyworld site
|
|
14
|
+
And I select the transformations link
|
|
15
|
+
Then I should see the text "Cucumber Transformations Screencast"
|
|
16
|
+
|
|
17
|
+
@mobile
|
|
3
18
|
Scenario: Creating an iPhone browser on ios 7.1
|
|
4
19
|
When I establish a iphone_ios71 browser on the remote machine using Selenium
|
|
5
20
|
And I go to the cheezyworld site
|
|
6
21
|
And I select the transformations link
|
|
7
22
|
Then I should see the text "Cucumber Transformations Screencast"
|
|
8
23
|
|
|
24
|
+
@mobile
|
|
9
25
|
Scenario: Creating an iPhone browser on ios 7.0
|
|
10
26
|
When I establish a iphone_ios70 browser on the remote machine using Selenium
|
|
11
27
|
And I go to the cheezyworld site
|
|
12
28
|
And I select the transformations link
|
|
13
29
|
Then I should see the text "Cucumber Transformations Screencast"
|
|
14
30
|
|
|
31
|
+
@mobile
|
|
15
32
|
Scenario: Creating an iPhone browser on ios 6.1
|
|
16
33
|
When I establish a iphone_ios61 browser on the remote machine using Selenium
|
|
17
34
|
And I go to the cheezyworld site
|
|
18
35
|
And I select the transformations link
|
|
19
36
|
Then I should see the text "Cucumber Transformations Screencast"
|
|
20
37
|
|
|
38
|
+
@mobile
|
|
21
39
|
Scenario: Creating an iPhone browser on ios 6.0
|
|
22
40
|
When I establish a iphone_ios60 browser on the remote machine using Selenium
|
|
23
41
|
And I go to the cheezyworld site
|
|
24
42
|
And I select the transformations link
|
|
25
43
|
Then I should see the text "Cucumber Transformations Screencast"
|
|
26
|
-
|
|
@@ -1,54 +1,67 @@
|
|
|
1
1
|
Feature: RDee should work well with browsers on a remote selenium grid
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
@firefox
|
|
4
4
|
Scenario: Creating a browser on the remote machine using Selenium
|
|
5
5
|
When I establish a firefox browser on the remote machine using Selenium
|
|
6
6
|
Then I should be able to perform a google search for cheezyworld
|
|
7
7
|
And I should be able to close the connection
|
|
8
8
|
|
|
9
|
+
@firefox
|
|
9
10
|
Scenario: Creating a browser on the remote machine using Watir
|
|
10
11
|
When I establish a firefox browser on the remote machine using Watir
|
|
11
12
|
Then I should be able to perform a google search for cheezyworld
|
|
12
13
|
And I should be able to close the connection
|
|
13
14
|
|
|
15
|
+
@chrome
|
|
16
|
+
Scenario: Creating a browser on Windows 10
|
|
17
|
+
When I establish a chrome32_win10 browser on the remote machine using Watir
|
|
18
|
+
Then I should be able to perform a google search for cheezyworld
|
|
19
|
+
And I should be able to close the connection
|
|
20
|
+
|
|
21
|
+
@chrome
|
|
14
22
|
Scenario: Creating a browser on Windows 8.1
|
|
15
23
|
When I establish a chrome32_win81 browser on the remote machine using Watir
|
|
16
24
|
Then I should be able to perform a google search for cheezyworld
|
|
17
25
|
And I should be able to close the connection
|
|
18
26
|
|
|
27
|
+
@chrome
|
|
19
28
|
Scenario: Creating a browser on Windows 8
|
|
20
29
|
When I establish a chrome32_win8 browser on the remote machine using Watir
|
|
21
30
|
Then I should be able to perform a google search for cheezyworld
|
|
22
31
|
And I should be able to close the connection
|
|
23
32
|
|
|
33
|
+
@chrome
|
|
24
34
|
Scenario: Creating a browser on Windows 7
|
|
25
35
|
When I establish a chrome32_win7 browser on the remote machine using Watir
|
|
26
36
|
Then I should be able to perform a google search for cheezyworld
|
|
27
37
|
And I should be able to close the connection
|
|
28
38
|
|
|
39
|
+
@chrome
|
|
29
40
|
Scenario: Creating a browser on Windows XP
|
|
30
41
|
When I establish a chrome32_winxp browser on the remote machine using Watir
|
|
31
42
|
Then I should be able to perform a google search for cheezyworld
|
|
32
43
|
And I should be able to close the connection
|
|
33
44
|
|
|
34
|
-
|
|
35
|
-
|
|
45
|
+
@chrome
|
|
46
|
+
Scenario: Creating a browser on El Capitan
|
|
47
|
+
When I establish a chrome32_el_capitan browser on the remote machine using Watir
|
|
36
48
|
Then I should be able to perform a google search for cheezyworld
|
|
37
49
|
And I should be able to close the connection
|
|
38
50
|
|
|
51
|
+
@chrome
|
|
39
52
|
Scenario: Creating a browser on Mountain Lion
|
|
40
53
|
When I establish a chrome32_mountain_lion browser on the remote machine using Watir
|
|
41
54
|
Then I should be able to perform a google search for cheezyworld
|
|
42
55
|
And I should be able to close the connection
|
|
43
56
|
|
|
57
|
+
@chrome
|
|
44
58
|
Scenario: Creating a browser on Mavricks
|
|
45
59
|
When I establish a chrome32_mavricks browser on the remote machine using Watir
|
|
46
60
|
Then I should be able to perform a google search for cheezyworld
|
|
47
61
|
And I should be able to close the connection
|
|
48
62
|
|
|
63
|
+
@chrome
|
|
49
64
|
Scenario: Creating a browser on Linux
|
|
50
65
|
When I establish a chrome32_linux browser on the remote machine using Watir
|
|
51
66
|
Then I should be able to perform a google search for cheezyworld
|
|
52
67
|
And I should be able to close the connection
|
|
53
|
-
|
|
54
|
-
|
data/lib/rdee.rb
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module RDee
|
|
2
|
+
module AdditionalOptions
|
|
3
|
+
|
|
4
|
+
def additional_options_for(target)
|
|
5
|
+
options = {}
|
|
6
|
+
options.merge!(chrome_options) if need_chrome_options? target
|
|
7
|
+
options.merge!(firefox_options) if need_firefox_options? target
|
|
8
|
+
options.merge!(ie_options) if need_ie_optons? target
|
|
9
|
+
options.merge!(safari_options) if need_safari_options? target
|
|
10
|
+
options.merge!(iphone_options) if need_iphone_options? target
|
|
11
|
+
options
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def need_chrome_options?(target)
|
|
15
|
+
not chrome_options.nil? and target.to_s.include? 'chrome'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def need_firefox_options?(target)
|
|
19
|
+
not firefox_options.nil? and target.to_s.include? 'firefox'
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def need_ie_optons?(target)
|
|
23
|
+
not ie_options.nil? and target.to_s.include? 'ie'
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def need_safari_options?(target)
|
|
27
|
+
not safari_options.nil? and target.to_s.include? 'safari'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def need_iphone_options?(target)
|
|
31
|
+
not iphone_options.nil? and target.to_s.include? 'iphone'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|
data/lib/rdee/browser_factory.rb
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require_relative 'target_parser'
|
|
2
2
|
require_relative 'mobile_devices'
|
|
3
|
+
require_relative 'desired_capabilities'
|
|
4
|
+
require_relative 'additional_options'
|
|
3
5
|
|
|
4
6
|
module RDee
|
|
5
7
|
class ConnectionError < StandardError
|
|
@@ -7,6 +9,8 @@ module RDee
|
|
|
7
9
|
|
|
8
10
|
class BrowserFactory
|
|
9
11
|
include TargetParser
|
|
12
|
+
include DesiredCapabilities
|
|
13
|
+
include AdditionalOptions
|
|
10
14
|
|
|
11
15
|
attr_accessor :url, :persistent_http, :chrome_options, :firefox_options,
|
|
12
16
|
:ie_options, :safari_options, :iphone_options
|
|
@@ -53,55 +57,18 @@ module RDee
|
|
|
53
57
|
target = ENV['RDEE_BROWSER'].to_sym if ENV['RDEE_BROWSER']
|
|
54
58
|
platform, version, host = parse(target)
|
|
55
59
|
options.merge! additional_options_for target
|
|
56
|
-
capabilities = capabilities(platform, version, host)
|
|
57
60
|
options[:url] = url unless url.nil?
|
|
58
61
|
if options.include? :url
|
|
62
|
+
options[:desired_capabilities] = capabilities(platform, version, host, options[:desired_capabilities])
|
|
59
63
|
platform = :remote
|
|
60
|
-
options[:desired_capabilities] = capabilities
|
|
61
64
|
end
|
|
62
65
|
options[:http_client] = http_client if persistent_http or options.delete(:persistent_http)
|
|
63
66
|
return platform, options
|
|
64
67
|
end
|
|
65
68
|
|
|
66
|
-
def capabilities(platform, version, host)
|
|
67
|
-
capabilities = Selenium::WebDriver::Remote::Capabilities.send platform
|
|
68
|
-
capabilities.version = version unless version.nil?
|
|
69
|
-
capabilities.platform = host unless host.nil?
|
|
70
|
-
capabilities
|
|
71
|
-
end
|
|
72
|
-
|
|
73
69
|
def http_client
|
|
74
70
|
Selenium::WebDriver::Remote::Http::Persistent.new
|
|
75
71
|
end
|
|
76
72
|
|
|
77
|
-
def additional_options_for(target)
|
|
78
|
-
options = {}
|
|
79
|
-
options.merge!(chrome_options) if need_chrome_options? target
|
|
80
|
-
options.merge!(firefox_options) if need_firefox_options? target
|
|
81
|
-
options.merge!(ie_options) if need_ie_optons? target
|
|
82
|
-
options.merge!(safari_options) if need_safari_options? target
|
|
83
|
-
options.merge!(iphone_options) if need_iphone_options? target
|
|
84
|
-
options
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
def need_chrome_options?(target)
|
|
88
|
-
not chrome_options.nil? and target.to_s.include? 'chrome'
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def need_firefox_options?(target)
|
|
92
|
-
not firefox_options.nil? and target.to_s.include? 'firefox'
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
def need_ie_optons?(target)
|
|
96
|
-
not ie_options.nil? and target.to_s.include? 'ie'
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
def need_safari_options?(target)
|
|
100
|
-
not safari_options.nil? and target.to_s.include? 'safari'
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
def need_iphone_options?(target)
|
|
104
|
-
not iphone_options.nil? and target.to_s.include? 'iphone'
|
|
105
|
-
end
|
|
106
73
|
end
|
|
107
74
|
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module RDee
|
|
2
|
+
module DesiredCapabilities
|
|
3
|
+
|
|
4
|
+
def capabilities(platform, version, host, existing_capabilities)
|
|
5
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.send platform
|
|
6
|
+
capabilities.version = version unless version.nil?
|
|
7
|
+
capabilities.platform = host unless host.nil?
|
|
8
|
+
capabilities = existing_capabilities.merge(capabilities) if existing_capabilities
|
|
9
|
+
capabilities
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
end
|
|
14
|
+
end
|
data/lib/rdee/target_parser.rb
CHANGED
|
@@ -8,7 +8,7 @@ module RDee
|
|
|
8
8
|
target = target_for(value)
|
|
9
9
|
version = version_for(value)
|
|
10
10
|
host = host_for(value)
|
|
11
|
-
return
|
|
11
|
+
return target, version, host
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
private
|
|
@@ -38,23 +38,27 @@ module RDee
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def mobile_version(value)
|
|
41
|
-
value.to_s.split(/_/).slice(1..-1)[0][-2,2].insert(1, '.')
|
|
41
|
+
value.to_s.split(/_/).slice(1..-1)[0][-2, 2].insert(1, '.')
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def host_lookup
|
|
45
45
|
@host_lookup ||= {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
win10: 'Windows 10',
|
|
47
|
+
win81: 'Windows 8.1',
|
|
48
|
+
win8: 'Windows 8',
|
|
49
|
+
win7: 'Windows 7',
|
|
50
|
+
winxp: 'Windows XP',
|
|
51
|
+
mountain_lion: 'OS X 10.8',
|
|
52
|
+
mavricks: 'OS X 10.9',
|
|
53
|
+
yosemite: 'OS X 10.10',
|
|
54
|
+
el_capitan: 'OS X 10.11',
|
|
55
|
+
linux: 'Linux',
|
|
56
|
+
ios60: 'OS X 10.8',
|
|
57
|
+
ios61: 'OS X 10.8',
|
|
58
|
+
ios70: 'OS X 10.9',
|
|
59
|
+
ios71: 'OS X 10.9',
|
|
60
|
+
ios80: 'OS X 10.10',
|
|
61
|
+
ios81: 'OS X 10.10'
|
|
58
62
|
}
|
|
59
63
|
end
|
|
60
64
|
|
data/lib/rdee/version.rb
CHANGED
data/spec/lib/rd_spec.rb
CHANGED
|
@@ -13,9 +13,9 @@ describe RDee do
|
|
|
13
13
|
|
|
14
14
|
it "should catch and print exceptions that occur when establishing a connection" do
|
|
15
15
|
expect(watir_browser).to receive(:new).and_raise(Exception, 'foo')
|
|
16
|
-
expect{ RDee.watir_browser }.to raise_error(RDee::ConnectionError, 'foo')
|
|
16
|
+
expect { RDee.watir_browser }.to raise_error(RDee::ConnectionError, 'foo')
|
|
17
17
|
end
|
|
18
|
-
end
|
|
18
|
+
end
|
|
19
19
|
|
|
20
20
|
context "when getting a connection for Selenium" do
|
|
21
21
|
let(:selenium_browser) { Selenium::WebDriver }
|
|
@@ -27,9 +27,9 @@ end
|
|
|
27
27
|
|
|
28
28
|
it "should catch and print exceptions that occur when establishing a connection" do
|
|
29
29
|
expect(selenium_browser).to receive(:for).and_raise(Exception, 'foo')
|
|
30
|
-
expect{ RDee.selenium_browser }.to raise_error(RDee::ConnectionError, 'foo')
|
|
30
|
+
expect { RDee.selenium_browser }.to raise_error(RDee::ConnectionError, 'foo')
|
|
31
31
|
end
|
|
32
|
-
end
|
|
32
|
+
end
|
|
33
33
|
|
|
34
34
|
context "when using common functionality" do
|
|
35
35
|
it "should use the BROWSER environment variable when present" do
|
|
@@ -82,7 +82,7 @@ end
|
|
|
82
82
|
end
|
|
83
83
|
|
|
84
84
|
end
|
|
85
|
-
|
|
85
|
+
|
|
86
86
|
context "when passing additional browser options" do
|
|
87
87
|
it "should allow users to add additional options for chrome by configuration" do
|
|
88
88
|
RDee.configure do |config|
|
|
@@ -26,6 +26,11 @@ describe RDee::TargetParser do
|
|
|
26
26
|
expect(version).to be_nil
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
+
it "should parse the windows 10 host" do
|
|
30
|
+
target, version, host = parser.parse(:firefox30_win10)
|
|
31
|
+
expect(host).to eql 'Windows 10'
|
|
32
|
+
end
|
|
33
|
+
|
|
29
34
|
it "should parse the windows 8.1 host" do
|
|
30
35
|
target, version, host = parser.parse(:firefox30_win81)
|
|
31
36
|
expect(host).to eql 'Windows 8.1'
|
|
@@ -46,9 +51,9 @@ describe RDee::TargetParser do
|
|
|
46
51
|
expect(host).to eql 'Windows XP'
|
|
47
52
|
end
|
|
48
53
|
|
|
49
|
-
it "should parse
|
|
50
|
-
target, version, host = parser.parse(:
|
|
51
|
-
expect(host).to eql 'OS X 10.
|
|
54
|
+
it "should parse el capitan" do
|
|
55
|
+
target, version, host = parser.parse(:firefox30_el_capitan)
|
|
56
|
+
expect(host).to eql 'OS X 10.11'
|
|
52
57
|
end
|
|
53
58
|
|
|
54
59
|
it "should parse mountain lion" do
|
data/spec/lib/targets_spec.rb
CHANGED
|
@@ -211,13 +211,33 @@ describe "Supported browser combinations" do
|
|
|
211
211
|
RDee.watir_browser :iphone_ios71, url: 'http://blah'
|
|
212
212
|
end
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
it "includes iPhone with ios 8.0" do
|
|
215
|
+
expect(desired_capabilities).to receive(:version=).with('8.0')
|
|
216
|
+
expect(desired_capabilities).to receive(:platform=).with('OS X 10.10')
|
|
217
|
+
expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
|
|
218
|
+
RDee.watir_browser :iphone_ios80, url: 'http://blah'
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
it "includes iPhone with ios 8.1" do
|
|
222
|
+
expect(desired_capabilities).to receive(:version=).with('8.1')
|
|
223
|
+
expect(desired_capabilities).to receive(:platform=).with('OS X 10.10')
|
|
224
|
+
expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
|
|
225
|
+
RDee.watir_browser :iphone_ios81, url: 'http://blah'
|
|
226
|
+
end
|
|
227
|
+
end
|
|
215
228
|
|
|
216
229
|
context "for hosts" do
|
|
217
230
|
before(:each) do
|
|
218
231
|
allow(capabilities).to receive(:firefox).and_return(desired_capabilities)
|
|
219
232
|
end
|
|
220
233
|
|
|
234
|
+
it "should properly identify Windows 10" do
|
|
235
|
+
expect(desired_capabilities).to receive(:version=).with('30')
|
|
236
|
+
expect(desired_capabilities).to receive(:platform=).with('Windows 10')
|
|
237
|
+
expect(watir_browser).to receive(:new)
|
|
238
|
+
RDee.watir_browser :firefox30_win10, url: 'http://blah'
|
|
239
|
+
end
|
|
240
|
+
|
|
221
241
|
it "should properly identify Windows 8.1" do
|
|
222
242
|
expect(desired_capabilities).to receive(:version=).with('30')
|
|
223
243
|
expect(desired_capabilities).to receive(:platform=).with('Windows 8.1')
|
|
@@ -246,11 +266,11 @@ describe "Supported browser combinations" do
|
|
|
246
266
|
RDee.watir_browser :firefox30_winxp, url: 'http://blah'
|
|
247
267
|
end
|
|
248
268
|
|
|
249
|
-
it "should properly identify
|
|
269
|
+
it "should properly identify El Capitan" do
|
|
250
270
|
expect(desired_capabilities).to receive(:version=).with('30')
|
|
251
|
-
expect(desired_capabilities).to receive(:platform=).with('OS X 10.
|
|
271
|
+
expect(desired_capabilities).to receive(:platform=).with('OS X 10.11')
|
|
252
272
|
expect(watir_browser).to receive(:new)
|
|
253
|
-
RDee.watir_browser :
|
|
273
|
+
RDee.watir_browser :firefox30_el_capitan, url: 'http://blah'
|
|
254
274
|
end
|
|
255
275
|
|
|
256
276
|
it "should properly identify Mountain Lion" do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: RDee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: '0.
|
|
4
|
+
version: '0.4'
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeffrey S. Morgan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-10-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: watir-webdriver
|
|
@@ -135,7 +135,9 @@ files:
|
|
|
135
135
|
- features/support/pages/cheezyworld.rb
|
|
136
136
|
- features/support/pages/google_search.rb
|
|
137
137
|
- lib/rdee.rb
|
|
138
|
+
- lib/rdee/additional_options.rb
|
|
138
139
|
- lib/rdee/browser_factory.rb
|
|
140
|
+
- lib/rdee/desired_capabilities.rb
|
|
139
141
|
- lib/rdee/mobile_devices.rb
|
|
140
142
|
- lib/rdee/target_parser.rb
|
|
141
143
|
- lib/rdee/version.rb
|
|
@@ -164,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
164
166
|
version: '0'
|
|
165
167
|
requirements: []
|
|
166
168
|
rubyforge_project:
|
|
167
|
-
rubygems_version: 2.
|
|
169
|
+
rubygems_version: 2.5.1
|
|
168
170
|
signing_key:
|
|
169
171
|
specification_version: 4
|
|
170
172
|
summary: Dynamically create a connection for Selenium or Watir.
|