lib/element_extensions.rb in gridium-1.1.4 vs lib/element_extensions.rb in gridium-1.1.6

- old
+ new

@@ -1,20 +1,20 @@ include Gridium class Gridium::ElementExtensions def self.highlight(element) - Log.debug("Highlighting element...") + Log.debug("[GRIDIUM::ElementExtensions] Highlighting element...") original_border = Driver.execute_script("return arguments[0].style.border", element.element) original_background = Driver.execute_script("return arguments[0].style.backgroundColor", element.element) Driver.execute_script("arguments[0].style.border='3px solid lime'; return;", element.element) Driver.execute_script("arguments[0].style.backgroundColor='lime'; return;", element.element) sleep (Gridium.config.highlight_duration) Driver.execute_script("arguments[0].style.border='" + original_border + "'; return;", element.element) Driver.execute_script("arguments[0].style.backgroundColor='" + original_background + "'; return;", element.element) end def self.scroll_to(element) - Log.debug("Scrolling element into view...") + Log.debug("[GRIDIUM::ElementExtensions] Scrolling element into view...") Driver.execute_script("arguments[0].scrollIntoView(); return;", element.element) sleep 1 end def self.hover_over(element)