lib/element.rb in gridium-1.1.13 vs lib/element.rb in gridium-1.1.14
- old
+ new
@@ -21,17 +21,19 @@
# should always be driver unless getting an element's child
@parent ||= (opts[:parent] || @driver)
#how long to wait between clearing an input and sending keys to it
@text_padding_time = 0.15
+
+ @default_timeout = Gridium.config.element_timeout
end
def to_s
"'#{@name}' (By:#{@by} => '#{@locator}')"
end
def element(opts = {})
- timeout = opts[:timeout].nil? ? Gridium.config.element_timeout : opts[:timeout]
+ timeout = opts[:timeout].nil? ? @default_timeout : opts[:timeout]
if stale?
wait = Selenium::WebDriver::Wait.new :timeout => timeout, :interval => 1
if Gridium.config.visible_elements_only
wait.until { @element = displayed_element }