File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 22
33### Added
44
5+ - ` Ferrum::Network::Exchange#blob? ` determines if the exchange is blob [ #516 ]
56- ` Ferrum::Network::Request#headers ` are enhanced and supplemented with ` Network.requestWillBeSentExtraInfo ` [ #506 ]
67- ` Ferrum::Page#off ` to unsubscribe from CDP events [ #455 ]
78- ` Ferrum::Mouse#scroll_by ` to be able to scroll by, as alternative to ` scroll_to ` [ #514 ]
1213
1314- Correctly set mouse events buttons property [ #509 ]
1415- Prevent 'Hash#[ ] =': can't add a new key into hash during iteration [ #513 ]
16+ - ` Ferrum::Network::Exchange#finished? ` and ` Ferrum::Network#wait_for_idle ` take into account that request can be a blob [ #496 ]
1517
1618### Removed
1719
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ def blocked?
8383 # @return [Boolean]
8484 #
8585 def finished?
86- blocked? || response &.loaded? || !error . nil? || ping? || !! url &. start_with? ( " blob:" )
86+ blocked? || response &.loaded? || !error . nil? || ping? || blob?
8787 end
8888
8989 #
@@ -131,6 +131,15 @@ def ping?
131131 !!request &.ping?
132132 end
133133
134+ #
135+ # Determines if the exchange is blob.
136+ #
137+ # @return [Boolean]
138+ #
139+ def blob?
140+ !!url &.start_with? ( "blob:" )
141+ end
142+
134143 #
135144 # Returns request's URL.
136145 #
Original file line number Diff line number Diff line change 139139
140140 it "returns true for blob requests" do
141141 exchange = Ferrum ::Network ::Exchange . new ( page , "1" )
142+ expect ( exchange . blob? ) . to be false
142143 expect ( exchange . finished? ) . to be false
143144
144145 exchange . request = Ferrum ::Network ::Request . new (
149150 }
150151 }
151152 )
153+ expect ( exchange . blob? ) . to be true
152154 expect ( exchange . finished? ) . to be true
153155 end
154156 end
You can’t perform that action at this time.
0 commit comments