Skip to content

Commit

Permalink
fixed minor issue with audio and canvas when using multiple locators
Browse files Browse the repository at this point in the history
  • Loading branch information
cheezy committed Jul 22, 2012
1 parent f234484 commit 1dae519
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion features/support/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ class Page
canvas(:canvas_class, :class => 'canvas')
canvas(:canvas_index, :index => 0)
canvas(:canvas_xpath, :xpath => '//canvas')
canvas(:canvas_class_index, :class => 'area', :index => 0)
canvas(:canvas_class_index, :class => 'canvas', :index => 0)
canvas(:canvas_name_index, :name => 'canvas', :index => 0)

audio(:audio_id, :id => 'audio')
Expand Down
2 changes: 1 addition & 1 deletion lib/page-object/elements/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def method_missing(*args, &block)
protected

def self.should_build_watir_xpath identifier
['table', 'span', 'div', 'td', 'li', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'label', 'area', 'canvas'].include? identifier[:tag_name] and identifier[:name]
['table', 'span', 'div', 'td', 'li', 'ul', 'ol', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'p', 'label', 'area', 'canvas', 'audio'].include? identifier[:tag_name] and identifier[:name]
end

def self.build_xpath_for identifier
Expand Down

0 comments on commit 1dae519

Please sign in to comment.