lib/capybara/window.rb in capybara-3.33.0 vs lib/capybara/window.rb in capybara-3.34.0

- old
+ new

@@ -2,11 +2,11 @@ module Capybara ## # The {Window} class represents a browser window. # - # You can get an instance of the class by calling either of: + # You can get an instance of the class by calling any of: # # * {Capybara::Session#windows} # * {Capybara::Session#current_window} # * {Capybara::Session#window_opened_by} # * {Capybara::Session#switch_to_window} @@ -80,12 +80,12 @@ ## # Resize window. # # @macro about_current - # @param width [String] the new window width in pixels - # @param height [String] the new window height in pixels + # @param width [Integer] the new window width in pixels + # @param height [Integer] the new window height in pixels # def resize_to(width, height) wait_for_stable_size { @driver.resize_window_to(handle, width, height) } end @@ -135,12 +135,8 @@ sleep 0.025 return res if prev_size == size break if timer.expired? end raise Capybara::WindowError, "Window size not stable within #{seconds} seconds." - end - - def raise_unless_current(what) - raise Capybara::WindowError, "#{what} not current window is not possible." unless current? end end end