webrat/spec/public/locators/field_by_xpath_spec.rb
Bryan Helmkamp 03914fd293 Whitespace
2009-04-07 20:30:12 -04:00

20 lines
422 B
Ruby

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
describe "field_by_xpath" do
it "should work" do
with_html <<-HTML
<html>
<form>
<label for="element_42">The Label</label>
<input type="text" id="element_42">
</form>
</html>
HTML
field = field_by_xpath(".//input")
field.should_not be_nil
field.id.should == "element_42"
end
end