123456789_123456789_123456789_123456789_123456789_

Class: Selenium::WebDriver::Remote::BiDiBridge

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Bridge
Instance Chain:
Inherits: Selenium::WebDriver::Remote::Bridge
Defined in: rb/lib/selenium/webdriver/remote/bidi_bridge.rb

Constant Summary

Bridge - Inherited

COMMANDS, PORT, QUIT_ERRORS

Class Attribute Summary

Class Method Summary

Bridge - Inherited

.add_command,
.new

Initializes the bridge with the given server URL.

Instance Attribute Summary

Instance Method Summary

Bridge - Inherited

#accept_alert

alerts.

#action

actions.

#actions

Alias for Bridge#action.

#active_element

finding elements.

#add_cookie, #add_credential,
#add_virtual_authenticator

virtual-authenticator.

#alert_text, #bidi, #browser,
#cancel_fedcm_dialog

federated-credential management.

#clear_element, #clear_local_storage, #clear_session_storage, #click_element, #click_fedcm_dialog_button, #close, #command_list, #cookie, #cookies,
#create_session

Creates session.

#credentials, #delete_all_cookies, #delete_cookie, #dismiss_alert, #element_aria_label, #element_aria_role, #element_attribute, #element_displayed?, #element_dom_attribute, #element_enabled?, #element_location, #element_location_once_scrolled_into_view, #element_property, #element_rect, #element_screenshot, #element_selected?, #element_size,
#element_tag_name

element properties.

#element_text, #element_value, #element_value_of_css_property, #execute_async_script,
#execute_script

javascript execution.

#fedcm_account_list, #fedcm_delay, #fedcm_dialog_type, #fedcm_subtitle, #fedcm_title, #find_element_by, #find_elements_by, #full_screen_window, #get,
#go_back

navigation.

#go_forward,
#local_storage_item

HTML 5.

#local_storage_keys, #local_storage_size,
#manage

cookies.

#maximize_window, #minimize_window,
#new_window

Create a new top-level browsing context w3c.github.io/webdriver/#new-window.

#page_source, #print_page, #quit, #refresh, #release_actions, #remove_all_credentials, #remove_credential, #remove_local_storage_item, #remove_session_storage_item, #remove_virtual_authenticator, #reposition_window, #reset_fedcm_cooldown, #resize_window, #screenshot, #select_fedcm_account, #send_actions, #send_keys_to_element,
#session_id

Returns the current session ID.

#session_storage_item, #session_storage_keys, #session_storage_size, #set_window_rect, #shadow_root, #status, #submit_element,
#switch_to_active_element
#switch_to_default_content, #switch_to_frame, #switch_to_parent_frame, #switch_to_window, #title, #url, #user_verified, #window_handle,
#window_handles

window handling.

#window_position, #window_rect, #window_size, #commands, #element_id_from, #escaper,
#execute

executes a command on the remote server.

#prepare_capabilities_payload, #shadow_root_id_from, #unwrap_script_result

::Selenium::WebDriver::Atoms - Included

Constructor Details

This class inherits a constructor from Selenium::WebDriver::Remote::Bridge

Instance Attribute Details

#bidi (readonly)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 24

attr_reader :bidi

Instance Method Details

#browsing_context (private)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 60

def browsing_context
  @browsing_context ||= WebDriver::BiDi::BrowsingContext.new(self)
end

#close

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 54

def close
  execute(:close_window).tap { |handles| bidi.close if handles.empty? }
end

#create_session(capabilities)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 26

def create_session(capabilities)
  super
  socket_url = @capabilities[:web_socket_url]
  @bidi = Selenium::WebDriver::BiDi.new(url: socket_url)
end

#get(url)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 32

def get(url)
  browsing_context.navigate(url)
end

#go_back

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 36

def go_back
  browsing_context.traverse_history(-1)
end

#go_forward

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 40

def go_forward
  browsing_context.traverse_history(1)
end

#quit

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 48

def quit
  super
ensure
  bidi.close
end

#refresh

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/remote/bidi_bridge.rb', line 44

def refresh
  browsing_context.reload
end