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.
- data/lib/tellurium_driver.rb +13 -6
- metadata +1 -1
data/lib/tellurium_driver.rb
CHANGED
@@ -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
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|