Skip to content

Commit

Permalink
fix: Method Page#frame_by should return nil in case frame is not fo…
Browse files Browse the repository at this point in the history
…und or none of the passed arguments is String.
  • Loading branch information
route committed Apr 25, 2024
1 parent 6df4ed6 commit 814e676
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/ferrum/page/frames.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def frames
end

#
# Find frame by given options.
# Find a frame by given params.
#
# @param [String] id
# Unique frame's id that page provides.
Expand All @@ -60,8 +60,6 @@ def frame_by(id: nil, name: nil, execution_id: nil)
frames.find { |f| f.name == name }
elsif execution_id
frames.find { |f| f.execution_id == execution_id }
else
raise ArgumentError
end
end

Expand Down

0 comments on commit 814e676

Please sign in to comment.