lib/page.rb in gridium-1.1.3 vs lib/page.rb in gridium-1.1.4
- old
+ new
@@ -94,18 +94,19 @@
def self.jquery_loaded?
self.evaluate_script("jQuery.active").zero?
end
def all(by, locator)
- Driver.driver.find_elements(by, locator)
+ root = Element.new("root", :tag_name, "html")
+ root.find_elements(by, locator)
end
def find(by, locator)
Element.new("Page Find Element", by, locator)
end
def first(by, locator)
- Driver.driver.find_elements(by, locator).first
+ all(by, locator).first
end
def click_on(text)
Element.new("Clicking #{text}", :xpath, "//*[text()='#{text}')]").click
end