Skip to content

Commit d33e28f

Browse files
committed
Add specs for relative locator using other root locator than tag_name
1 parent 3dd70c2 commit d33e28f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,15 @@ module WebDriver
163163
it 'should find above another' do
164164
driver.navigate.to url_for('relative_locators.html')
165165

166-
above = driver.find_elements(relative: {tag_name: 'td', above: {id: 'center'}})
166+
above = driver.find_elements(relative: {css: 'td', above: {id: 'center'}})
167167
expect(above.map { |e| e.attribute('id') }).to eq(%w[second first third])
168168
end
169169

170170
it 'should find below element' do
171171
driver.navigate.to url_for('relative_locators.html')
172172

173173
midpoint = driver.find_element(id: 'mid')
174-
above = driver.find_elements(relative: {tag_name: 'p', below: midpoint})
174+
above = driver.find_elements(relative: {id: 'below', below: midpoint})
175175
expect(above.map { |e| e.attribute('id') }).to eq(['below'])
176176
end
177177

0 commit comments

Comments
 (0)