tellurium_driver 1.1.16 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/tellurium_driver.rb +13 -6
  2. metadata +1 -1
@@ -53,16 +53,23 @@ class TelluriumDriver
53
53
  end
54
54
 
55
55
 
56
- TelluriumDriver.before(TelluriumDriver.instance_methods.reject { |name| name.to_s.include?("initialize")}) do
56
+ TelluriumDriver.before(TelluriumDriver.instance_methods.reject { |name| name.to_s.include?("initialize") || name.to_s.include?("method_missing")}) do
57
57
  begin
58
- wait = Selenium::WebDriver::Wait.new(:timeout=>120)
59
- wait.until{ self.driver.execute_script("document.readyState") == "complete" }
60
- rescue Exception => e
61
- puts e.message
58
+ if(@wait_for_document_ready)
59
+ wait = Selenium::WebDriver::Wait.new(:timeout=>120)
60
+ wait.until{ self.driver.execute_script("document.readyState") == "complete" }
61
+ rescue Exception => e
62
+ puts e.message
63
+ end
62
64
  end
63
-
64
65
  end
65
66
 
67
+ #Tells tellurium whether or not to use JS to check for document to be ready
68
+ #
69
+ #@param value [Boolean]
70
+ def wait_for_document_ready=(value)
71
+ @wait_for_document_ready=value
72
+ end
66
73
 
67
74
  def driver
68
75
  @driver
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tellurium_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.16
4
+ version: 1.1.17
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: