Class: Selenium::WebDriver::BiDi::Protocol::Browser Private
- Defined in:
- rb/lib/selenium/webdriver/bidi/protocol/browser.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: DownloadBehavior, SetClientWindowStateParameters
Constant Summary collapse
- CLIENT_WINDOW_INFO_STATE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ fullscreen: 'fullscreen', maximized: 'maximized', minimized: 'minimized', normal: 'normal' }.freeze
- CLIENT_WINDOW_NAMED_STATE_STATE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ fullscreen: 'fullscreen', maximized: 'maximized', minimized: 'minimized' }.freeze
- ClientWindowInfo =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( active: {wire_key: 'active', primitive: 'boolean'}, client_window: {wire_key: 'clientWindow', primitive: 'string'}, height: {wire_key: 'height', primitive: 'integer', min: 0, max: 9_007_199_254_740_991}, state: {wire_key: 'state', enum: 'Browser::CLIENT_WINDOW_INFO_STATE'}, width: {wire_key: 'width', primitive: 'integer', min: 0, max: 9_007_199_254_740_991}, x: {wire_key: 'x', primitive: 'integer', min: -9_007_199_254_740_991, max: 9_007_199_254_740_991}, y: {wire_key: 'y', primitive: 'integer', min: -9_007_199_254_740_991, max: 9_007_199_254_740_991} )
- UserContextInfo =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define(user_context: {wire_key: 'userContext', primitive: 'string'})
- CreateUserContextParameters =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( accept_insecure_certs: {wire_key: 'acceptInsecureCerts', required: false, primitive: 'boolean'}, proxy: {wire_key: 'proxy', required: false, ref: 'Session::ProxyConfiguration'}, unhandled_prompt_behavior: { wire_key: 'unhandledPromptBehavior', required: false, ref: 'Session::UserPromptHandler' } )
- GetClientWindowsResult =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( client_windows: {wire_key: 'clientWindows', ref: 'Browser::ClientWindowInfo', list: true} )
- GetUserContextsResult =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( user_contexts: {wire_key: 'userContexts', ref: 'Browser::UserContextInfo', list: true} )
- RemoveUserContextParameters =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( user_context: {wire_key: 'userContext', primitive: 'string'} )
- SetDownloadBehaviorParameters =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Serialization::Record.define( download_behavior: {wire_key: 'downloadBehavior', nullable: true, ref: 'Browser::DownloadBehavior'}, user_contexts: {wire_key: 'userContexts', required: false, list: true, primitive: 'string'} )
Instance Method Summary collapse
- #close ⇒ Object private
- #create_user_context(accept_insecure_certs: Serialization::UNSET, proxy: Serialization::UNSET, unhandled_prompt_behavior: Serialization::UNSET) ⇒ Object private
- #download_behavior ⇒ Object private
- #get_client_windows ⇒ Object private
- #get_user_contexts ⇒ Object private
- #remove_user_context(user_context:) ⇒ Object private
- #set_client_window_state(client_window:, state:, width: Serialization::UNSET, height: Serialization::UNSET, x: Serialization::UNSET, y: Serialization::UNSET) ⇒ Object private
- #set_download_behavior(download_behavior:, user_contexts: Serialization::UNSET) ⇒ Object private
Methods inherited from Domain
Constructor Details
This class inherits a constructor from Selenium::WebDriver::BiDi::Protocol::Domain
Instance Method Details
#close ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
179 180 181 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 179 def close execute(cmd: 'browser.close') end |
#create_user_context(accept_insecure_certs: Serialization::UNSET, proxy: Serialization::UNSET, unhandled_prompt_behavior: Serialization::UNSET) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 186 def create_user_context( accept_insecure_certs: Serialization::UNSET, proxy: Serialization::UNSET, unhandled_prompt_behavior: Serialization::UNSET ) params = CreateUserContextParameters.new( accept_insecure_certs: accept_insecure_certs, proxy: proxy, unhandled_prompt_behavior: unhandled_prompt_behavior ) execute(cmd: 'browser.createUserContext', params: params, result: Browser::UserContextInfo) end |
#download_behavior ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
174 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 174 def download_behavior = DownloadBehavior |
#get_client_windows ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
202 203 204 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 202 def get_client_windows execute(cmd: 'browser.getClientWindows', result: Browser::GetClientWindowsResult) end |
#get_user_contexts ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
209 210 211 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 209 def get_user_contexts execute(cmd: 'browser.getUserContexts', result: Browser::GetUserContextsResult) end |
#remove_user_context(user_context:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
216 217 218 219 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 216 def remove_user_context(user_context:) params = RemoveUserContextParameters.new(user_context: user_context) execute(cmd: 'browser.removeUserContext', params: params) end |
#set_client_window_state(client_window:, state:, width: Serialization::UNSET, height: Serialization::UNSET, x: Serialization::UNSET, y: Serialization::UNSET) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 224 def set_client_window_state( client_window:, state:, width: Serialization::UNSET, height: Serialization::UNSET, x: Serialization::UNSET, y: Serialization::UNSET ) Serialization.validate!( 'state', state, {normal: 'normal', fullscreen: 'fullscreen', maximized: 'maximized', minimized: 'minimized'} ) params = SetClientWindowStateParameters.build( client_window: client_window, state: state, width: width, height: height, x: x, y: y ) execute(cmd: 'browser.setClientWindowState', params: params, result: Browser::ClientWindowInfo) end |
#set_download_behavior(download_behavior:, user_contexts: Serialization::UNSET) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
251 252 253 254 255 256 257 |
# File 'rb/lib/selenium/webdriver/bidi/protocol/browser.rb', line 251 def set_download_behavior(download_behavior:, user_contexts: Serialization::UNSET) params = SetDownloadBehaviorParameters.new( download_behavior: download_behavior, user_contexts: user_contexts ) execute(cmd: 'browser.setDownloadBehavior', params: params) end |