RDee 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d408e6cf327eeb052ad4c5dbf27a5d53acfb268
4
- data.tar.gz: '08d65a995e98398c399b1443005845975d5ce864'
3
+ metadata.gz: ba156a4bf434b0f37306a71ecf82fddf138ceedf
4
+ data.tar.gz: 0ef24619d7cb972a0d4dc9a5533d5d0c7bc16435
5
5
  SHA512:
6
- metadata.gz: 3940e3a0befb086707462b1889a5443707cde306ab6167516482f27ab195f504528936333e771902656f1df4bfd10c513e15fa797a439310ddbbe0252ae2c4fc
7
- data.tar.gz: 88f0d3dd7fa0d964ba8b36597398bf6c8094cea88bef7ded085365bda30af0dfa737eacde1dd009f999c9a8aef74ef15b8d28dda2d9722284c0fa09f87fa96ef
6
+ metadata.gz: 9285bcec378656ba74345a5b90ec92fe61ecbbbeff4ce5e34b4a3ccdb18b1a89688985bda52b48130f08c0e077397e18097538683c633778c2b18ab566ed84de
7
+ data.tar.gz: 05455af04a594cbae645ba4ce47e4bf5ff56824e5b44b46209fd0879537e47f169109a30e9af941fffbf24bece81d4529ab611d2c7ca4689e0c7aeeb5429b300
data/ChangeLog CHANGED
@@ -1,3 +1,9 @@
1
+ === Release 0.7 / 23 March 2017
2
+ * Enhancements
3
+ * Full support for all iOS devices
4
+ * Ability to set additional ios capabilities via configuration
5
+ * renamed iphone_options to ios_options
6
+
1
7
  === Release 0.6 / 1 March 2017
2
8
  * Enhancements
3
9
  * Added support for Sierra
data/README.md CHANGED
@@ -11,9 +11,9 @@ can select browsers that are running on your local machine or on a Selenium Grid
11
11
  you select a browser is by calling one of the following methods:
12
12
 
13
13
  ````ruby
14
- RDee.selenium_browser(target = :firefox, options = {})
14
+ RDee.selenium_browser(target = :chrome, options = {})
15
15
  # or
16
- RDee.watir_browser(target = :firefox, options = {})
16
+ RDee.watir_browser(target = :chrome, options = {})
17
17
  ````
18
18
 
19
19
  These methods take two optional parameters. The first is the target browser. The second
@@ -49,16 +49,22 @@ 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`, `safari`, `phantomjs` or `iphone`. In the near future we will be supporting more
52
+ specify `firefox`, `chrome`, `ie`, `safari`, `phantomjs` or `ios`. 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
56
56
  it will select whatever version is available. It is up to you to make sure that the browser
57
57
  and version combination are valid.
58
58
 
59
+ For mobile the version is the version of the OS you require replacing the
60
+ dot with an underscore. For example, `:ios10_2` will use iOS 10.2. You will
61
+ provide the additional information like the device type as additional
62
+ values. See below.
63
+
59
64
  Following the version there is an underscore followed by the host os. This value is also
60
65
  optional. Currently the following host os values are available:
61
66
 
67
+
62
68
  | host | description |
63
69
  | --- | --- |
64
70
  | win10 | Windows 10 |
@@ -72,12 +78,7 @@ optional. Currently the following host os values are available:
72
78
  | el_capitan | OS X 10.11 |
73
79
  | sierra | macOS 10.12 |
74
80
  | linux | Linux |
75
- | ios60 | 'OS X 10.8'|
76
- | ios61 | 'OS X 10.8' |
77
- | ios70 | 'OS X 10.9' |
78
- | ios71 | 'OS X 10.9' |
79
- | ios80 | 'OS X 10.10' |
80
- | ios81 | 'OS X 10.10' |
81
+ | ios | 'iOS' |
81
82
 
82
83
  The host os value is typically used when running the tests on a Selenium Grid. It is up to
83
84
  you to ensure that the host and requested browser combination exist on your grid.
@@ -98,9 +99,55 @@ RDee.configure do | config |
98
99
  config.firefox_options = { :switches => %w[--disable-popups]}
99
100
  config.ie_options = { :switches => %w[--disable-popups]}
100
101
  config.safari_options = { :switches => %w[--disable-popups]}
102
+ config.ios_options = { :switches => %w[--disable-popups]}
103
+ end
104
+ ````
105
+
106
+ ### Mobile Specific Additional Settings
107
+ Mobile is more complex that the standard desktop browsers. In order to get everything
108
+ to work properly on a mobile platform you will need to provide some additional information.
109
+ Here is an example:
110
+
111
+ ````ruby
112
+ mobile_capabilities = {
113
+ appiumVersion: '1.6.3',
114
+ deviceName: 'iPhone Simulator',
115
+ deviceOrientation: 'portrait'
116
+ }
117
+ RDee.watir_browser(target = :ios10_2, desired_capabilities: mobile_capabilities)
118
+ ````
119
+
120
+ Another way to specify these additional capabilities is to specify them in the configure
121
+ block like this:
122
+
123
+ ````ruby
124
+ RDee.configure do | config |
125
+ config.url = 'http://path.to.selenium.grid/wd/hub'
126
+ config.ios_capabilities = {
127
+ appiumVersion: '1.6.3',
128
+ deviceName: 'iPhone Simulator',
129
+ deviceOrientation: 'portrait'
130
+ }
101
131
  end
102
132
  ````
103
133
 
134
+ Using the config allows us to set the values via environment variables without changing code.
135
+
136
+ ````ruby
137
+ RDee.configure do | config |
138
+ config.url = 'http://path.to.selenium.grid/wd/hub'
139
+ config.ios_capabilities = {
140
+ appiumVersion: ENV['appiumVersion'],
141
+ deviceName: ENV['deviceName'],
142
+ deviceOrientation: ENV['deviceOrientation']
143
+ }
144
+ end
145
+ ````
146
+
147
+
148
+ To see what options you should use please look at the
149
+ [Sauce Labs Configurator](https://wiki.saucelabs.com/display/DOCS/Platform+Configurator#/).
150
+
104
151
 
105
152
  ## Installation
106
153
 
@@ -38,3 +38,8 @@ Feature: RDee should work well with browsers when target is set via environment
38
38
  Then I should be able to perform a google search for cheezyworld
39
39
  And I should be able to close the connection
40
40
 
41
+ @chrome
42
+ Scenario: Using switches that are passed to the browser
43
+ When I set switches via configuration and use a Watir browser
44
+ Then I should be able to perform a google search for cheezyworld
45
+ And I should be able to close the connection
@@ -2,42 +2,42 @@ Feature: RDee should work well with mobile devices on a remote selenium grid
2
2
 
3
3
  @mobile
4
4
  Scenario: Creating an iPhone browser on ios 8.1
5
- When I establish a iphone_ios81 browser on the remote machine using Selenium
5
+ When I establish a mobile browser for ios8_1 on the remote machine using Watir
6
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"
7
+ And I select the first title link
8
+ Then I should see the text from the first heading
9
9
 
10
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
11
+ Scenario: Creating an iPhone browser on ios 10.0
12
+ When I establish a mobile browser for ios10_0 on the remote machine using Watir
13
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"
14
+ And I select the first title link
15
+ Then I should see the text from the first heading
16
16
 
17
17
  @mobile
18
- Scenario: Creating an iPhone browser on ios 7.1
19
- When I establish a iphone_ios71 browser on the remote machine using Selenium
18
+ Scenario: Creating an iPhone browser on ios 8.2
19
+ When I establish a mobile browser for ios8_2 on the remote machine using Watir
20
20
  And I go to the cheezyworld site
21
- And I select the transformations link
22
- Then I should see the text "Cucumber Transformations Screencast"
21
+ And I select the first title link
22
+ Then I should see the text from the first heading
23
23
 
24
24
  @mobile
25
- Scenario: Creating an iPhone browser on ios 7.0
26
- When I establish a iphone_ios70 browser on the remote machine using Selenium
25
+ Scenario: Creating an iPhone browser on ios 9.0
26
+ When I establish a mobile browser for ios9_0 on the remote machine using Selenium
27
27
  And I go to the cheezyworld site
28
- And I select the transformations link
29
- Then I should see the text "Cucumber Transformations Screencast"
28
+ And I select the first title link
29
+ Then I should see the text from the first heading
30
30
 
31
31
  @mobile
32
- Scenario: Creating an iPhone browser on ios 6.1
33
- When I establish a iphone_ios61 browser on the remote machine using Selenium
32
+ Scenario: Creating an iPhone browser on ios 10.2
33
+ When I establish a mobile browser for ios10_2 on the remote machine using Watir
34
34
  And I go to the cheezyworld site
35
- And I select the transformations link
36
- Then I should see the text "Cucumber Transformations Screencast"
35
+ And I select the first title link
36
+ Then I should see the text from the first heading
37
37
 
38
38
  @mobile
39
- Scenario: Creating an iPhone browser on ios 6.0
40
- When I establish a iphone_ios60 browser on the remote machine using Selenium
39
+ Scenario: Creating an iPhone browser using RDee configuration
40
+ When I use RDee configuration to establish an ios10_2 mobile browser
41
41
  And I go to the cheezyworld site
42
- And I select the transformations link
43
- Then I should see the text "Cucumber Transformations Screencast"
42
+ And I select the first title link
43
+ Then I should see the text from the first heading
@@ -50,7 +50,7 @@ Feature: RDee should work well with browsers on a remote selenium grid
50
50
 
51
51
  @chrome
52
52
  Scenario: Creating a browser on Mountain Lion
53
- When I establish a chrome32_mountain_lion browser on the remote machine using Watir
53
+ When I establish a chrome32_sierra browser on the remote machine using Watir
54
54
  Then I should be able to perform a google search for cheezyworld
55
55
  And I should be able to close the connection
56
56
 
@@ -8,9 +8,33 @@ When(/^I establish a (.+) browser with a variable using (.+)$/) do |browser, pla
8
8
  ENV.delete 'RDEE_BROWSER'
9
9
  end
10
10
 
11
- When(/^I establish a (.+) browser on the remote machine using (.+)$/) do |browser, platform|
11
+ When(/^I use RDee configuration to establish an (.+) mobile browser$/) do |browser|
12
+ RDee.configure do |config|
13
+ config.url = 'http://rdee:730071ad-7331-4d65-bd56-ec3ebfdd8232@ondemand.saucelabs.com:80/wd/hub'
14
+ config.ios_capabilities = {
15
+ appiumVersion: '1.6.3',
16
+ deviceName: 'iPhone Simulator',
17
+ deviceOrientation: 'portrait'
18
+ }
19
+ @browser = RDee.watir_browser(browser.to_sym)
20
+ end
21
+ end
22
+
23
+ When(/^I establish an? (.+) browser on the remote machine using (.+)$/) do |browser, platform|
24
+ @browser = RDee.send "#{platform.downcase}_browser",
25
+ browser.to_sym,
26
+ url: 'http://rdee:730071ad-7331-4d65-bd56-ec3ebfdd8232@ondemand.saucelabs.com:80/wd/hub'
27
+ end
28
+
29
+ When(/^I establish an? mobile browser for (.+) on the remote machine using (.+)$/) do |browser, platform|
30
+ mobile_options = {
31
+ appiumVersion: '1.6.3',
32
+ deviceName: 'iPhone Simulator',
33
+ deviceOrientation: 'portrait'
34
+ }
12
35
  @browser = RDee.send "#{platform.downcase}_browser",
13
36
  browser.to_sym,
37
+ desired_capabilities: mobile_options,
14
38
  url: 'http://rdee:730071ad-7331-4d65-bd56-ec3ebfdd8232@ondemand.saucelabs.com:80/wd/hub'
15
39
  end
16
40
 
@@ -31,10 +55,28 @@ When(/^I go to the cheezyworld site$/) do
31
55
  visit CheezyWorld
32
56
  end
33
57
 
34
- When(/^I select the transformations link$/) do
35
- on(CheezyWorld).transformations_element.click
36
- end
37
-
38
58
  Then(/^I should see the text "(.*?)"$/) do |message|
39
59
  expect(@current_page.text).to include message
40
60
  end
61
+
62
+
63
+ And(/^I select the first title link$/) do
64
+ on(CheezyWorld) do |page|
65
+ @first_heading = page.first_heading_element.text
66
+ page.first_heading_element.click
67
+ end
68
+ end
69
+
70
+ Then(/^I should see the text from the first heading$/) do
71
+ on(CheezyWorld) do |page|
72
+ expect(page.text).to include @first_heading
73
+ end
74
+ end
75
+
76
+ When(/^I set switches via configuration and use a Watir browser$/) do
77
+ ENV['RDEE_BROWSER'] = 'chrome'
78
+ RDee.configure do |config|
79
+ config.chrome_options = { :switches => %w[--disable-extensions]}
80
+ end
81
+ @browser = RDee.watir_browser
82
+ end
@@ -3,6 +3,6 @@ class CheezyWorld
3
3
 
4
4
  page_url 'http://cheezyworld.com'
5
5
 
6
- h2(:transformations, class: 'post-title')
6
+ h1(:first_heading, class: 'entry-title')
7
7
 
8
8
  end
@@ -7,7 +7,7 @@ module RDee
7
7
  options.merge!(firefox_options) if need_firefox_options? target
8
8
  options.merge!(ie_options) if need_ie_optons? target
9
9
  options.merge!(safari_options) if need_safari_options? target
10
- options.merge!(iphone_options) if need_iphone_options? target
10
+ options.merge!(ios_options) if need_ios_options? target
11
11
  options
12
12
  end
13
13
 
@@ -27,8 +27,8 @@ module RDee
27
27
  not safari_options.nil? and target.to_s.include? 'safari'
28
28
  end
29
29
 
30
- def need_iphone_options?(target)
31
- not iphone_options.nil? and target.to_s.include? 'iphone'
30
+ def need_ios_options?(target)
31
+ not ios_options.nil? and target.to_s.include? 'ios'
32
32
  end
33
33
 
34
34
  end
@@ -6,14 +6,16 @@ require_relative 'additional_options'
6
6
  module RDee
7
7
  class ConnectionError < StandardError
8
8
  end
9
-
9
+
10
10
  class BrowserFactory
11
11
  include TargetParser
12
12
  include DesiredCapabilities
13
13
  include AdditionalOptions
14
14
 
15
- attr_accessor :url, :persistent_http, :chrome_options, :firefox_options,
16
- :ie_options, :safari_options, :iphone_options
15
+ attr_accessor :url, :persistent_http
16
+ attr_accessor :chrome_options, :firefox_options, :ie_options,
17
+ :safari_options, :ios_options
18
+ attr_accessor :ios_capabilities
17
19
 
18
20
  def watir_browser(target, options)
19
21
  platform, options = platform_and_options(target, options)
@@ -54,7 +56,7 @@ module RDee
54
56
  end
55
57
 
56
58
  def platform_and_options(target, options)
57
- target = ENV['RDEE_BROWSER'].to_sym if ENV['RDEE_BROWSER']
59
+ target = ENV['RDEE_BROWSER'].to_sym if ENV['RDEE_BROWSER']
58
60
  platform, version, host = parse(target)
59
61
  options.merge! additional_options_for target
60
62
  options[:url] = url unless url.nil?
@@ -1,14 +1,38 @@
1
+ require_relative 'mobile_capabilities'
2
+
1
3
  module RDee
2
4
  module DesiredCapabilities
5
+ include MobileDevices
6
+ include MobileCapabilities
3
7
 
4
8
  def capabilities(platform, version, host, existing_capabilities)
9
+ existing_capabilities = {} unless existing_capabilities
10
+ return mobile_capabilities(platform, version, existing_capabilities) if mobile?(platform)
11
+ browser_capabilities(platform, version, host, existing_capabilities)
12
+ end
13
+
14
+ def browser_capabilities(platform, version, host, existing_capabilities)
5
15
  capabilities = Selenium::WebDriver::Remote::Capabilities.send platform
6
16
  capabilities.version = version unless version.nil?
7
17
  capabilities.platform = host unless host.nil?
8
- capabilities = existing_capabilities.merge(capabilities) if existing_capabilities
18
+ existing_capabilities.each do |key, value|
19
+ capabilities[key] = value
20
+ end
9
21
  capabilities
10
22
  end
11
23
 
24
+ def mobile_capabilities(platform, version, existing_capabilities)
25
+ existing_capabilities.merge!(additional_capabilities_for(platform))
26
+ capabilities = Selenium::WebDriver::Remote::Capabilities
27
+ .new({
28
+ platformVersion: version,
29
+ platformName: mobile_platform[platform],
30
+ browserName: mobile_browsers[platform],
31
+ platform: :mac,
32
+ javascript_enabled: true
33
+ }.merge(existing_capabilities))
34
+
35
+ end
12
36
 
13
37
  end
14
38
  end
@@ -0,0 +1,15 @@
1
+ require_relative 'mobile_devices'
2
+
3
+ module RDee
4
+ module MobileCapabilities
5
+ include MobileDevices
6
+
7
+ def additional_capabilities_for(target)
8
+ caps = {}
9
+ caps.merge!(ios_capabilities) if mobile_platform[target].eql?('iOS') and ios_capabilities
10
+ caps
11
+ end
12
+
13
+ end
14
+ end
15
+
@@ -8,9 +8,19 @@ module RDee
8
8
 
9
9
 
10
10
  def mobile_targets
11
- @mobile_targets ||= [
12
- :iphone
13
- ]
11
+ mobile_browsers.keys
12
+ end
13
+
14
+ def mobile_browsers
15
+ @mobile_browsers ||= {
16
+ ios: 'Safari'
17
+ }
18
+ end
19
+
20
+ def mobile_platform
21
+ @mobile_platform ||= {
22
+ ios: 'iOS'
23
+ }
14
24
  end
15
25
 
16
26
  end
@@ -38,7 +38,7 @@ 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.match(/[a-z]+(\d+\_*\d*)/)[1].gsub('_', '.')
42
42
  end
43
43
 
44
44
  def host_lookup
@@ -54,12 +54,7 @@ module RDee
54
54
  el_capitan: 'OS X 10.11',
55
55
  sierra: 'macOS 10.12',
56
56
  linux: 'Linux',
57
- ios60: 'OS X 10.8',
58
- ios61: 'OS X 10.8',
59
- ios70: 'OS X 10.9',
60
- ios71: 'OS X 10.9',
61
- ios80: 'OS X 10.10',
62
- ios81: 'OS X 10.10'
57
+ ios: 'iOS'
63
58
  }
64
59
  end
65
60
 
@@ -1,3 +1,3 @@
1
1
  module RDee
2
- VERSION = "0.6"
2
+ VERSION = "0.7"
3
3
  end
@@ -0,0 +1,55 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Mobile targets' do
4
+
5
+ before(:each) do
6
+ allow(Watir::Browser).to receive(:new)
7
+ end
8
+
9
+ let(:capabilities) { Selenium::WebDriver::Remote::Capabilities }
10
+
11
+ context "when using iOS" do
12
+
13
+ let(:caps) {
14
+ {
15
+ platformVersion: '1.0',
16
+ platformName: 'iOS',
17
+ browserName: 'Safari',
18
+ platform: :mac,
19
+ javascript_enabled: true
20
+ }
21
+ }
22
+
23
+ it 'includes iOS 9.3' do
24
+ caps[:platformVersion] = '9.3'
25
+ expect(capabilities).to receive(:new).with(caps)
26
+ RDee.watir_browser :ios9_3, url: 'http://blah'
27
+ end
28
+
29
+ it 'includes iOS 10.2' do
30
+ caps[:platformVersion] = '10.2'
31
+ expect(capabilities).to receive(:new).with(caps)
32
+ RDee.watir_browser :ios10_2, url: 'http://blah'
33
+ end
34
+
35
+ it 'should allow additional capabilities to be pass in via configuration' do
36
+ ios_capabilities = {
37
+ appiumVersion: '1.6.3',
38
+ deviceName: 'iPhone Simulator',
39
+ deviceOrientation: 'portrait'
40
+ }
41
+ RDee.configure do |config|
42
+ config.url = 'http://blah'
43
+ config.ios_capabilities = ios_capabilities
44
+ end
45
+ caps[:platformVersion] = '10.2'
46
+ expect(capabilities).to receive(:new).with(caps.merge(ios_capabilities))
47
+ RDee.watir_browser :ios10_2
48
+ RDee.configure do |config|
49
+ config.url = nil
50
+ config.ios_capabilities = nil
51
+ end
52
+ end
53
+ end
54
+ end
55
+
@@ -172,25 +172,25 @@ describe RDee do
172
172
  end
173
173
  end
174
174
 
175
- it "should allow users to add additional options for iPhone by configuration" do
175
+ it "should allow users to add additional options for ios by configuration" do
176
176
  RDee.configure do |config|
177
- config.iphone_options = {iphone_options: 'option'}
177
+ config.ios_options = {ios_options: 'option'}
178
178
  end
179
- expect(watir_browser).to receive(:new).with(:iphone, iphone_options: 'option')
180
- RDee.watir_browser(:iphone_ios70)
179
+ expect(watir_browser).to receive(:new).with(:ios, ios_options: 'option')
180
+ RDee.watir_browser(:ios8_0)
181
181
  RDee.configure do |config|
182
- config.iphone_options = nil
182
+ config.ios_options = nil
183
183
  end
184
184
  end
185
185
 
186
- it "shoudl not add iphone_options when not using iPhone" do
186
+ it "should not add ios_options when not using ios" do
187
187
  RDee.configure do |config|
188
- config.iphone_options = {iphone_options: 'option'}
188
+ config.ios_options = {ios_options: 'option'}
189
189
  end
190
190
  expect(watir_browser).to receive(:new).with(:firefox)
191
191
  RDee.watir_browser(:firefox)
192
192
  RDee.configure do |config|
193
- config.iphone_options = nil
193
+ config.ios_options = nil
194
194
  end
195
195
  end
196
196
 
@@ -71,26 +71,6 @@ describe RDee::TargetParser do
71
71
  expect(host).to eql 'Linux'
72
72
  end
73
73
 
74
- it "should parse ios60 for iphone" do
75
- target, version, host = parser.parse(:iphone_ios60)
76
- expect(host).to eql 'OS X 10.8'
77
- end
78
-
79
- it "should parse ios70 for iphone" do
80
- target, version, host = parser.parse(:iphone_ios70)
81
- expect(host).to eql 'OS X 10.9'
82
- end
83
-
84
- it "should parse ios71 for iphone" do
85
- target, version, host = parser.parse(:iphone_ios71)
86
- expect(host).to eql 'OS X 10.9'
87
- end
88
-
89
- it "should parse ios61 for iphone" do
90
- target, version, host = parser.parse(:iphone_ios61)
91
- expect(host).to eql 'OS X 10.8'
92
- end
93
-
94
74
  it "should cleanly handle an invalid host" do
95
75
  target, version, host = parser.parse(:firefox30_foobar)
96
76
  expect(host).to be_nil
@@ -177,55 +177,6 @@ describe "Supported browser combinations" do
177
177
  end
178
178
  end
179
179
 
180
- context "for iPhone" do
181
-
182
- before(:each) do
183
- allow(capabilities).to receive(:iphone).and_return(desired_capabilities)
184
- end
185
-
186
- it "includes iPhone with ios 6.0" do
187
- expect(desired_capabilities).to receive(:version=).with('6.0')
188
- expect(desired_capabilities).to receive(:platform=).with('OS X 10.8')
189
- expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
190
- RDee.watir_browser :iphone_ios60, url: 'http://blah'
191
- end
192
-
193
- it "includes iPhone with ios 6.1" do
194
- expect(desired_capabilities).to receive(:version=).with('6.1')
195
- expect(desired_capabilities).to receive(:platform=).with('OS X 10.8')
196
- expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
197
- RDee.watir_browser :iphone_ios61, url: 'http://blah'
198
- end
199
-
200
- it "includes iPhone with ios 7.0" do
201
- expect(desired_capabilities).to receive(:version=).with('7.0')
202
- expect(desired_capabilities).to receive(:platform=).with('OS X 10.9')
203
- expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
204
- RDee.watir_browser :iphone_ios70, url: 'http://blah'
205
- end
206
-
207
- it "includes iPhone with ios 7.1" do
208
- expect(desired_capabilities).to receive(:version=).with('7.1')
209
- expect(desired_capabilities).to receive(:platform=).with('OS X 10.9')
210
- expect(watir_browser).to receive(:new).with(:remote, url: 'http://blah', desired_capabilities: anything())
211
- RDee.watir_browser :iphone_ios71, url: 'http://blah'
212
- end
213
-
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
228
-
229
180
  context "for hosts" do
230
181
  before(:each) do
231
182
  allow(capabilities).to receive(:firefox).and_return(desired_capabilities)
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.6'
4
+ version: '0.7'
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: 2017-03-02 00:00:00.000000000 Z
11
+ date: 2017-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: watir
@@ -137,10 +137,12 @@ files:
137
137
  - lib/rdee/additional_options.rb
138
138
  - lib/rdee/browser_factory.rb
139
139
  - lib/rdee/desired_capabilities.rb
140
+ - lib/rdee/mobile_capabilities.rb
140
141
  - lib/rdee/mobile_devices.rb
141
142
  - lib/rdee/target_parser.rb
142
143
  - lib/rdee/version.rb
143
144
  - rdee.gemspec
145
+ - spec/lib/moble_targets_spec.rb
144
146
  - spec/lib/rd_spec.rb
145
147
  - spec/lib/target_parser_spec.rb
146
148
  - spec/lib/targets_spec.rb
@@ -165,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
167
  version: '0'
166
168
  requirements: []
167
169
  rubyforge_project:
168
- rubygems_version: 2.5.2
170
+ rubygems_version: 2.6.11
169
171
  signing_key:
170
172
  specification_version: 4
171
173
  summary: Dynamically create a connection for Selenium or Watir.
@@ -178,6 +180,7 @@ test_files:
178
180
  - features/support/env.rb
179
181
  - features/support/pages/cheezyworld.rb
180
182
  - features/support/pages/google_search.rb
183
+ - spec/lib/moble_targets_spec.rb
181
184
  - spec/lib/rd_spec.rb
182
185
  - spec/lib/target_parser_spec.rb
183
186
  - spec/lib/targets_spec.rb