We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 006c5fc commit 3a2dc27Copy full SHA for 3a2dc27
bin/console
@@ -1,5 +1,8 @@
1
#!/usr/bin/env ruby
2
3
+lib = File.expand_path("../lib", __dir__)
4
+$:.unshift(lib) unless $:.include?(lib)
5
+
6
require "irb"
7
require "irb/completion"
8
require "ferrum"
lib/ferrum/page.rb
@@ -218,6 +218,14 @@ def subscribe
218
Thread.main.raise JavaScriptError.new(params.dig("exceptionDetails", "exception"))
219
end
220
221
222
+ on(:dialog) do |dialog, index, total|
223
+ if total == 1
224
+ warn "Dialog was shown but you didn't provide `on(:dialog)` callback, accepting it by default. " \
225
+ "Please take a look at https://github.com/rubycdp/ferrum#dialog"
226
+ dialog.accept
227
+ end
228
229
230
231
def prepare_page
0 commit comments