File tree Expand file tree Collapse file tree 4 files changed +5
-4
lines changed
Expand file tree Collapse file tree 4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2121- Correctly set mouse events buttons property [ #509 ]
2222- Prevent 'Hash#[ ] =': can't add a new key into hash during iteration [ #513 ]
2323- ` Ferrum::Network::Exchange#finished? ` and ` Ferrum::Network#wait_for_idle ` take into account that request can be a blob [ #496 ]
24+ - Safe call _ body_ method (DOM) when page is empty and no html [ #522 ]
2425
2526### Removed
2627
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ def doctype
9292 # browser.body # => '<html itemscope="" itemtype="http://schema.org/WebPage" lang="ru"><head>...
9393 #
9494 def body
95- evaluate ( "document.documentElement.outerHTML" )
95+ evaluate ( "document.documentElement? .outerHTML" ) || ""
9696 end
9797
9898 #
Original file line number Diff line number Diff line change 517517 %r{Request to http://.*/with_js failed \( net::ERR_INTERNET_DISCONNECTED\) }
518518 )
519519
520- expect ( page . at_css ( "body" ) . text ) . to match ( "No internet " )
520+ expect ( page . at_css ( "body" ) . text ) . to match ( "" )
521521 end
522522end
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ def puts(*args)
1919 browser = Ferrum ::Browser . new ( logger : logger )
2020 browser . body
2121 file_log = File . read ( file_path )
22- expect ( file_log ) . to include ( "return document.documentElement.outerHTML" )
22+ expect ( file_log ) . to include ( "return document.documentElement? .outerHTML" )
2323 expect ( file_log ) . to include ( "<html><head></head><body></body></html>" )
2424 ensure
2525 FileUtils . rm_f ( file_path )
@@ -32,7 +32,7 @@ def puts(*args)
3232
3333 browser . body
3434
35- expect ( logger . string ) . to include ( "return document.documentElement.outerHTML" )
35+ expect ( logger . string ) . to include ( "return document.documentElement? .outerHTML" )
3636 expect ( logger . string ) . to include ( "<html><head></head><body></body></html>" )
3737 ensure
3838 browser . quit
You can’t perform that action at this time.
0 commit comments