lib/scrap_kit/recipe.rb in scrap_kit-0.1.12 vs lib/scrap_kit/recipe.rb in scrap_kit-0.1.13
- old
+ new
@@ -89,10 +89,12 @@
end
end
end
def extract_value_from_element(element)
+ return nil unless element.exists?
+
if element&.respond_to?(:tag_name)
if element.tag_name.downcase == "input"
return element.attribute_value(:value)
end
end
@@ -191,10 +193,10 @@
element.select(value)
end
end
end
- sleep 0.25
+ sleep 1
@browser.wait_until do
@browser.ready_state == "complete"
end
end