Slight improvement to safariwatir driver

(still doesn't work though)
This commit is contained in:
Jonas Nicklas 2009-11-07 16:29:20 +01:00
parent e34a8d81d5
commit 80d594a873
1 changed files with 4 additions and 2 deletions

View File

@ -43,7 +43,9 @@ class Webcat::Driver::SafariWatir
end
def find(selector)
browser.send(:scripter).by_xpath(selector).map { |node| Node.new(node) }
foo = Struct.new(:what).new
foo.what = selector
browser.send(:scripter).operate_by_xpath(foo){}.map { |node| Node.new(node) }
end
private
@ -62,4 +64,4 @@ private
@_browser
end
end
end