Class: Selenium::WebDriver::Remote::BiDiBridge
- Inherits:
-
Bridge
- Object
- Bridge
- Selenium::WebDriver::Remote::BiDiBridge
show all
- Defined in:
- lib/selenium/webdriver/remote/bidi_bridge.rb
Constant Summary
Constants inherited
from Bridge
Selenium::WebDriver::Remote::Bridge::COMMANDS, Selenium::WebDriver::Remote::Bridge::PORT, Selenium::WebDriver::Remote::Bridge::QUIT_ERRORS
Instance Attribute Summary collapse
Attributes inherited from Bridge
#capabilities, #file_detector, #http
Instance Method Summary
collapse
Methods inherited from Bridge
#accept_alert, #action, #active_element, add_command, #add_cookie, #add_credential, #add_virtual_authenticator, #alert=, #alert_text, #browser, #cancel_fedcm_dialog, #clear_element, #clear_local_storage, #clear_session_storage, #click_element, #click_fedcm_dialog_button, #command_list, #cookie, #cookies, #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_text, #element_value, #element_value_of_css_property, #execute_async_script, #execute_script, #fedcm_account_list, #fedcm_delay, #fedcm_dialog_type, #fedcm_subtitle, #fedcm_title, #find_element_by, #find_elements_by, #full_screen_window, #initialize, #local_storage_item, #local_storage_keys, #local_storage_size, #manage, #maximize_window, #minimize_window, #new_window, #page_source, #print_page, #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, #session_storage_item, #session_storage_keys, #session_storage_size, #set_window_rect, #shadow_root, #status, #submit_element, #switch_to_default_content, #switch_to_frame, #switch_to_parent_frame, #switch_to_window, #timeouts, #timeouts=, #title, #url, #user_verified, #window_handle, #window_handles, #window_position, #window_rect, #window_size
Methods included from Atoms
#atom_script
Instance Attribute Details
#bidi ⇒ Object
Returns the value of attribute bidi.
24
25
26
|
# File 'lib/selenium/webdriver/remote/bidi_bridge.rb', line 24
def bidi
@bidi
end
|
Instance Method Details
#close ⇒ Object
54
55
56
|
# File '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) ⇒ Object
26
27
28
29
30
|
# File '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) ⇒ Object
32
33
34
|
# File 'lib/selenium/webdriver/remote/bidi_bridge.rb', line 32
def get(url)
browsing_context.navigate(url)
end
|
#go_back ⇒ Object
36
37
38
|
# File 'lib/selenium/webdriver/remote/bidi_bridge.rb', line 36
def go_back
browsing_context.traverse_history(-1)
end
|
#go_forward ⇒ Object
40
41
42
|
# File 'lib/selenium/webdriver/remote/bidi_bridge.rb', line 40
def go_forward
browsing_context.traverse_history(1)
end
|
#quit ⇒ Object
48
49
50
51
52
|
# File 'lib/selenium/webdriver/remote/bidi_bridge.rb', line 48
def quit
super
ensure
bidi.close
end
|
#refresh ⇒ Object
44
45
46
|
# File 'lib/selenium/webdriver/remote/bidi_bridge.rb', line 44
def refresh
browsing_context.reload
end
|