Skip to content

Commit 3772844

Browse files
committed
Modify tests to avoid element related failures on firefox
1 parent b1e14b6 commit 3772844

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

rb/spec/integration/selenium/webdriver/network_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module WebDriver
106106
network = described_class.new(driver)
107107
network.add_request_handler(&:continue)
108108
driver.navigate.to url_for('formPage.html')
109-
expect(driver.find_element(name: 'login')).to be_displayed
109+
expect(driver.current_url).to eq(url_for('formPage.html'))
110110
expect(network.callbacks.count).to be 1
111111
end
112112
end
@@ -116,7 +116,7 @@ module WebDriver
116116
network = described_class.new(driver)
117117
network.add_request_handler(url_for('formPage.html'), &:continue)
118118
driver.navigate.to url_for('formPage.html')
119-
expect(driver.find_element(name: 'login')).to be_displayed
119+
expect(driver.current_url).to eq(url_for('formPage.html'))
120120
expect(network.callbacks.count).to be 1
121121
end
122122
end
@@ -126,7 +126,7 @@ module WebDriver
126126
network = described_class.new(driver)
127127
network.add_request_handler(url_for('formPage.html'), url_for('basicAuth'), &:continue)
128128
driver.navigate.to url_for('formPage.html')
129-
expect(driver.find_element(name: 'login')).to be_displayed
129+
expect(driver.current_url).to eq(url_for('formPage.html'))
130130
expect(network.callbacks.count).to be 1
131131
end
132132
end
@@ -136,7 +136,7 @@ module WebDriver
136136
network = described_class.new(driver)
137137
network.add_request_handler(url_for('formPage.html'), pattern_type: :url, &:continue)
138138
driver.navigate.to url_for('formPage.html')
139-
expect(driver.find_element(name: 'login')).to be_displayed
139+
expect(driver.current_url).to eq(url_for('formPage.html'))
140140
expect(network.callbacks.count).to be 1
141141
end
142142
end
@@ -154,7 +154,7 @@ module WebDriver
154154
request.continue
155155
end
156156
driver.navigate.to url_for('formPage.html')
157-
expect(driver.find_element(name: 'login')).to be_displayed
157+
expect(driver.current_url).to eq(url_for('formPage.html'))
158158
expect(network.callbacks.count).to be 1
159159
end
160160
end
@@ -213,7 +213,7 @@ module WebDriver
213213
network = described_class.new(driver)
214214
network.add_response_handler(&:continue)
215215
driver.navigate.to url_for('formPage.html')
216-
expect(driver.find_element(name: 'login')).to be_displayed
216+
expect(driver.current_url).to eq(url_for('formPage.html'))
217217
expect(network.callbacks.count).to be 1
218218
end
219219
end
@@ -243,7 +243,7 @@ module WebDriver
243243
network = described_class.new(driver)
244244
network.add_response_handler(url_for('formPage.html'), pattern_type: :url, &:continue)
245245
driver.navigate.to url_for('formPage.html')
246-
expect(driver.find_element(name: 'login')).to be_displayed
246+
expect(driver.current_url).to eq(url_for('formPage.html'))
247247
expect(network.callbacks.count).to be 1
248248
end
249249
end
@@ -266,7 +266,7 @@ module WebDriver
266266
response.continue
267267
end
268268
driver.navigate.to url_for('formPage.html')
269-
expect(driver.find_element(name: 'login')).to be_displayed
269+
expect(driver.current_url).to eq(url_for('formPage.html'))
270270
expect(network.callbacks.count).to be 1
271271
end
272272
end

0 commit comments

Comments
 (0)