Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
specs for aria attributes (watir/watir-webdriver#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Dec 9, 2013
1 parent d5e95aa commit 01929e2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
16 changes: 16 additions & 0 deletions element_spec.rb
Expand Up @@ -62,6 +62,22 @@
end
end

bug "https://github.com/watir/watir-webdriver/issues/233" do
describe "aria-* attributes" do
before { browser.goto WatirSpec.url_for("aria_attributes.html") }

bug "http://github.com/jarib/celerity/issues#issue/27", :celerity do
it "finds elements by a aria-* attribute" do
expect(browser.p(:aria_label => "ruby-library")).to exist
end

it "returns the value of a aria-* attribute" do
expect(browser.p.aria_label).to eq "ruby-library"
end
end
end
end

describe "finding with unknown tag name" do
it "finds an element by xpath" do
expect(browser.element(:xpath => "//*[@for='new_user_first_name']")).to exist
Expand Down
9 changes: 9 additions & 0 deletions html/aria_attributes.html
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>aria-* attributes</title>
</head>
<body>
<p aria-label=ruby-library>watir-webdriver</p>
</body>
</html>

0 comments on commit 01929e2

Please sign in to comment.