Spec example for XPath.button was added
This commit is contained in:
parent
2f314f01d3
commit
f1b84510b3
|
@ -156,6 +156,19 @@ describe Capybara::XPath do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#button' do
|
||||||
|
it "should find a button by id or content" do
|
||||||
|
@query = @xpath.button('awe123').to_s
|
||||||
|
@driver.find(@query).first.value.should == 'awesome'
|
||||||
|
@query = @xpath.button('okay556').to_s
|
||||||
|
@driver.find(@query).first.value.should == 'okay'
|
||||||
|
@query = @xpath.button('click_me_123').to_s
|
||||||
|
@driver.find(@query).first.value.should == 'click_me'
|
||||||
|
@query = @xpath.button('Click me!').to_s
|
||||||
|
@driver.find(@query).first.value.should == 'click_me'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#radio_button' do
|
describe '#radio_button' do
|
||||||
it "should find a radio button by id or label" do
|
it "should find a radio button by id or label" do
|
||||||
@query = @xpath.radio_button('Male').to_s
|
@query = @xpath.radio_button('Male').to_s
|
||||||
|
|
Loading…
Reference in New Issue