lib/puppeteer/page.rb in puppeteer-ruby-0.0.17 vs lib/puppeteer/page.rb in puppeteer-ruby-0.0.18
- old
+ new
@@ -1114,25 +1114,31 @@
main_frame.wait_for_selector(selector, visible: visible, hidden: hidden, timeout: timeout)
end
define_async_method :async_wait_for_selector
+ # @param milliseconds [Integer] the number of milliseconds to wait.
+ def wait_for_timeout(milliseconds)
+ main_frame.wait_for_timeout(milliseconds)
+ end
+
# @param xpath [String]
# @param visible [Boolean] Wait for element visible (not 'display: none' nor 'visibility: hidden') on true. default to false.
# @param hidden [Boolean] Wait for element invisible ('display: none' nor 'visibility: hidden') on true. default to false.
# @param timeout [Integer]
def wait_for_xpath(xpath, visible: nil, hidden: nil, timeout: nil)
main_frame.wait_for_xpath(xpath, visible: visible, hidden: hidden, timeout: timeout)
end
define_async_method :async_wait_for_xpath
- # @param {Function|string} pageFunction
- # @param {!{polling?: string|number, timeout?: number}=} options
- # @param {!Array<*>} args
- # @return {!Promise<!Puppeteer.JSHandle>}
- def wait_for_function(page_function, options = {}, *args)
- main_frame.wait_for_function(page_function, options, *args)
+ # @param page_function [String]
+ # @param args [Integer|Array]
+ # @param polling [String]
+ # @param timeout [Integer]
+ # @return [Puppeteer::JSHandle]
+ def wait_for_function(page_function, args: [], polling: nil, timeout: nil)
+ main_frame.wait_for_function(page_function, args: args, polling: polling, timeout: timeout)
end
define_async_method :async_wait_for_function
end