Skip to content

Commit 4f446af

Browse files
committed
rb - update edge specs commensurate with Windows 10 build 10532
1 parent d9c9ea9 commit 4f446af

File tree

7 files changed

+170
-207
lines changed

7 files changed

+170
-207
lines changed

rb/spec/integration/selenium/webdriver/driver_spec.rb

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
expect(driver.title).to eq("XHTML Test Page")
2626
end
2727

28-
# Edge does not yet support session/:sessionId/source http://dev.modern.ie/platform/status/webdriver/details/
28+
# Edge does not yet support {GET} /session/{sessionId}/Source
2929
not_compliant_on :browser => :edge do
3030
it "should get the page source" do
3131
driver.navigate.to url_for("xhtmlTest.html")
@@ -93,12 +93,9 @@
9393
expect(driver.find_element(:link, "Foo").text).to eq("Foo")
9494
end
9595

96-
# Edge does not yet support xpath
97-
not_compliant_on :browser => :edge do
98-
it "should find by xpath" do
99-
driver.navigate.to url_for("xhtmlTest.html")
100-
expect(driver.find_element(:xpath, "//h1").text).to eq("XHTML Might Be The Future")
101-
end
96+
it "should find by xpath" do
97+
driver.navigate.to url_for("xhtmlTest.html")
98+
expect(driver.find_element(:xpath, "//h1").text).to eq("XHTML Might Be The Future")
10299
end
103100

104101
it "should find by css selector" do
@@ -111,8 +108,7 @@
111108
expect(driver.find_element(:tag_name, 'div').attribute("class")).to eq("navigation")
112109
end
113110

114-
# Edge does not yet support session/:sessionId/element/:id/element
115-
# http://dev.modern.ie/platform/status/webdriver/details/
111+
# Edge does not yet support {POST} /session/{sessionId}/element/{elementId}/element
116112
not_compliant_on :browser => :edge do
117113
it "should find child element" do
118114
driver.navigate.to url_for("nestedElements.html")
@@ -124,8 +120,7 @@
124120
end
125121
end
126122

127-
# Edge does not yet support session/:sessionId/element/:id/element
128-
# http://dev.modern.ie/platform/status/webdriver/details/
123+
# Edge does not yet support {POST} /session/{sessionId}/element/{elementId}/elements
129124
not_compliant_on :browser => :edge do
130125
it "should find child element by tag name" do
131126
driver.navigate.to url_for("nestedElements.html")
@@ -147,14 +142,11 @@
147142
expect(driver.find_element(:class => "header").text).to eq("XHTML Might Be The Future")
148143
end
149144

150-
# Edge does not yet support xpath
151-
not_compliant_on :browser => :edge do
152-
it "should find elements with the shortcut syntax" do
153-
driver.navigate.to url_for("xhtmlTest.html")
145+
it "should find elements with the shortcut syntax" do
146+
driver.navigate.to url_for("xhtmlTest.html")
154147

155-
expect(driver[:id1]).to be_kind_of(WebDriver::Element)
156-
expect(driver[:xpath => "//h1"]).to be_kind_of(WebDriver::Element)
157-
end
148+
expect(driver[:id1]).to be_kind_of(WebDriver::Element)
149+
expect(driver[:xpath => "//h1"]).to be_kind_of(WebDriver::Element)
158150
end
159151
end
160152

@@ -169,8 +161,7 @@
169161
driver.find_elements(:css, 'p')
170162
end
171163

172-
# Edge does not yet support session/:sessionId/element/:id/element
173-
# http://dev.modern.ie/platform/status/webdriver/details/
164+
# Edge does not yet support {POST} /session/{sessionId}/element/{elementId}/elements
174165
not_compliant_on :browser => :edge do
175166
it "should find children by field name" do
176167
driver.navigate.to url_for("nestedElements.html")
@@ -181,8 +172,6 @@
181172
end
182173
end
183174

184-
# Microsoft Edge does not return javascriptEnabled when passed in as desired capabilities
185-
not_compliant_on :browser => :edge do
186175
describe "execute script" do
187176
it "should return strings" do
188177
driver.navigate.to url_for("xhtmlTest.html")
@@ -275,11 +264,9 @@
275264
driver.navigate.to url_for("javascriptPage.html")
276265
expect(driver.execute_script("return arguments[0] + arguments[1];", "one", "two")).to eq("onetwo")
277266
end
278-
end
279267
end
280268

281-
# Microsoft Edge does not return javascriptEnabled when passed in as desired capabilities
282-
not_compliant_on :browser => [:iphone, :android, :phantomjs, :edge] do
269+
not_compliant_on :browser => [:iphone, :android, :phantomjs] do
283270
describe "execute async script" do
284271
before {
285272
driver.manage.timeouts.script_timeout = 0
@@ -296,6 +283,7 @@
296283
expect(result).to eq(3)
297284
end
298285

286+
# TODO - File bug with Microsoft; this command returns status 21, should return status 28
299287
it "times out if the callback is not invoked" do
300288
expect {
301289
# Script is expected to be async and explicitly callback, so this should timeout.

rb/spec/integration/selenium/webdriver/element_spec.rb

Lines changed: 30 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@
2626
driver.find_element(:id, "imageButton").click
2727
end
2828

29-
# Edge does not yet support /session/:sessionId/element/:id/submit
30-
# http://dev.modern.ie/platform/status/webdriver/details/
31-
not_compliant_on :browser => :edge do
32-
it "should submit" do
33-
driver.navigate.to url_for("formPage.html")
34-
driver.find_element(:id, "submitButton").submit
35-
end
29+
# TODO: File bug with Microsoft Edge documentation says this isn't supported, but it is
30+
# {POST} /session/{sessionId}/element/{id}/submit
31+
it "should submit" do
32+
driver.navigate.to url_for("formPage.html")
33+
driver.find_element(:id, "submitButton").submit
3634
end
3735

3836
it "should send string keys" do
@@ -73,11 +71,11 @@
7371
expect(driver.find_element(:id, "withText").attribute("rows")).to eq("5")
7472
end
7573

76-
not_compliant_on :browser => :edge do
77-
it "should return nil for non-existent attributes" do
78-
driver.navigate.to url_for("formPage.html")
79-
expect(driver.find_element(:id, "withText").attribute("nonexistent")).to be_nil
80-
end
74+
# TODO - File bug with Microsoft, this should return nil, but throws an error
75+
# Selenium::WebDriver::Error::UnknownError: unknown error
76+
it "should return nil for non-existent attributes" do
77+
driver.navigate.to url_for("formPage.html")
78+
expect(driver.find_element(:id, "withText").attribute("nonexistent")).to be_nil
8179
end
8280

8381
it "should clear" do
@@ -119,21 +117,15 @@
119117
expect(driver.find_element(:class, "header")).to be_displayed
120118
end
121119

122-
# Edge does not yet support /session/:sessionId/element/:id/location
123-
# http://dev.modern.ie/platform/status/webdriver/details/
124-
not_compliant_on :browser => :edge do
125-
it "should get location" do
126-
driver.navigate.to url_for("xhtmlTest.html")
127-
loc = driver.find_element(:class, "header").location
120+
it "should get location" do
121+
driver.navigate.to url_for("xhtmlTest.html")
122+
loc = driver.find_element(:class, "header").location
128123

129-
expect(loc.x).to be >= 1
130-
expect(loc.y).to be >= 1
131-
end
124+
expect(loc.x).to be >= 1
125+
expect(loc.y).to be >= 1
132126
end
133127

134-
# Edge does not yet support /session/:sessionId/element/:id/location_in_view
135-
# http://dev.modern.ie/platform/status/webdriver/details/
136-
not_compliant_on :browser => [:iphone, :edge] do
128+
not_compliant_on :browser => [:iphone] do
137129
it "should get location once scrolled into view" do
138130
driver.navigate.to url_for("javascriptPage.html")
139131
loc = driver.find_element(:id, 'keyUp').location_once_scrolled_into_view
@@ -143,8 +135,8 @@
143135
end
144136
end
145137

146-
# Edge does not yet support /session/:sessionId/element/:id/size
147-
# http://dev.modern.ie/platform/status/webdriver/details/
138+
# TODO - File bug with Microsoft, this command hangs
139+
# GET session/22A56752-2F60-45FB-B721-0CEB42CA77DF/element/4c3ee8d6-4ed4-492d-98c7-d8538366f7be/size
148140
not_compliant_on :browser => :edge do
149141
it "should get size" do
150142
driver.navigate.to url_for("xhtmlTest.html")
@@ -183,17 +175,14 @@
183175
end
184176
end
185177

186-
# Edge does not yet support xpath
187-
not_compliant_on :browser => :edge do
188-
it "should know when two elements are equal" do
189-
driver.navigate.to url_for("simpleTest.html")
178+
it "should know when two elements are equal" do
179+
driver.navigate.to url_for("simpleTest.html")
190180

191-
body = driver.find_element(:tag_name, 'body')
192-
xbody = driver.find_element(:xpath, "//body")
181+
body = driver.find_element(:tag_name, 'body')
182+
xbody = driver.find_element(:xpath, "//body")
193183

194-
expect(body).to eq(xbody)
195-
expect(body).to eql(xbody)
196-
end
184+
expect(body).to eq(xbody)
185+
expect(body).to eql(xbody)
197186
end
198187

199188
not_compliant_on :browser => :phantomjs do
@@ -209,19 +198,16 @@
209198
end
210199
end
211200

212-
# Edge does not yet support xpath
213-
not_compliant_on :browser => :edge do
214-
it "should return the same #hash for equal elements when found by Driver#find_element" do
215-
driver.navigate.to url_for("simpleTest.html")
201+
it "should return the same #hash for equal elements when found by Driver#find_element" do
202+
driver.navigate.to url_for("simpleTest.html")
216203

217-
body = driver.find_element(:tag_name, 'body')
218-
xbody = driver.find_element(:xpath, "//body")
204+
body = driver.find_element(:tag_name, 'body')
205+
xbody = driver.find_element(:xpath, "//body")
219206

220-
expect(body.hash).to eq(xbody.hash)
221-
end
207+
expect(body.hash).to eq(xbody.hash)
222208
end
223209

224-
# Edge does not yet support xpath
210+
# Edge does not yet support xpath location for {POST} /session/{sessionId}/elements
225211
not_compliant_on :browser => :edge do
226212
it "should return the same #hash for equal elements when found by Driver#find_elements" do
227213
driver.navigate.to url_for("simpleTest.html")

rb/spec/integration/selenium/webdriver/keyboard_spec.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ module Selenium
2323
module WebDriver
2424
describe Keyboard do
2525

26-
# Edge does not yet support session/:session_id/keys
27-
not_compliant_on :browser => [:chrome, :android, :iphone, :safari, :edge] do
26+
not_compliant_on :browser => [:chrome, :android, :iphone, :safari] do
2827
it "sends keys to the active element" do
2928
driver.navigate.to url_for("bodyTypingTest.html")
3029

@@ -37,7 +36,7 @@ module WebDriver
3736
end
3837

3938

40-
# Edge does not yet support /session/:sessionId/click
39+
# Edge does not yet support {GET} /session/{sessionId}/moveTo
4140
not_compliant_on :browser => :edge do
4241
it "can send keys with shift pressed" do
4342
driver.navigate.to url_for("javascriptPage.html")
@@ -60,7 +59,7 @@ module WebDriver
6059
expect { driver.keyboard.press :return }.to raise_error(ArgumentError)
6160
end
6261

63-
# Edge does not yet support /session/:sessionId/click
62+
# Edge does not yet support {GET} /session/{sessionId}/moveTo
6463
not_compliant_on :browser => :edge do
6564
it "can press and release modifier keys" do
6665
driver.navigate.to url_for("javascriptPage.html")

rb/spec/integration/selenium/webdriver/mouse_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
module Selenium
2323
module WebDriver
2424

25+
# Edge does not yet support {GET} /session/{sessionId}/moveTo
2526
not_compliant_on :browser => :edge do
2627
describe Mouse do
2728

rb/spec/integration/selenium/webdriver/options_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ module WebDriver
6060
expect(cookies.first[:value]).to eq("bar")
6161
end
6262

63-
not_compliant_on :browser => :edge do
64-
it "should delete one" do
65-
driver.navigate.to url_for("xhtmlTest.html")
63+
# TODO - File bug with Microsoft; This command returns unknown error:
64+
# DELETE session/EC3D38BB-BF62-4224-BB6D-E6820EF7C519/cookie/foo
65+
it "should delete one" do
66+
driver.navigate.to url_for("xhtmlTest.html")
67+
driver.manage.add_cookie :name => "foo", :value => "bar"
6668

67-
driver.manage.add_cookie :name => "foo", :value => "bar"
68-
driver.manage.delete_cookie("foo")
69-
end
69+
driver.manage.delete_cookie("foo")
7070
end
7171

72-
# Edge does not yet support xpath
72+
# This is not a w3c supported spec
7373
not_compliant_on :browser => :edge do
7474
it "should delete all" do
7575
driver.navigate.to url_for("xhtmlTest.html")

0 commit comments

Comments
 (0)