Class: Appium::Core::Base::BiDiBridge
- Inherits:
-
Bridge
- Object
- Selenium::WebDriver::Remote::Bridge
- Bridge
- Appium::Core::Base::BiDiBridge
- Defined in:
- lib/appium_lib_core/common/base/bidi_bridge.rb,
sig/lib/appium_lib_core/common/base/bidi_bridge.rbs
Constant Summary
Constants inherited from Bridge
Appium::Core::Base::Bridge::APPIUM_NATIVE_BROWSER_NAME, Appium::Core::Base::Bridge::APPIUM_PREFIX
Constants included from Device::ImageComparison
Device::ImageComparison::GET_SIMILARITY, Device::ImageComparison::MATCH_FEATURES, Device::ImageComparison::MATCH_TEMPLATE, Device::ImageComparison::MODE
Constants included from Device::AppState
Constants inherited from Selenium::WebDriver::Remote::Bridge
Selenium::WebDriver::Remote::Bridge::COMMANDS, Selenium::WebDriver::Remote::Bridge::ESCAPE_CSS_REGEXP, Selenium::WebDriver::Remote::Bridge::PORT, Selenium::WebDriver::Remote::Bridge::QUIT_ERRORS, Selenium::WebDriver::Remote::Bridge::UNICODE_CODE_POINT
Constants included from Selenium::WebDriver::Chrome::Features
Selenium::WebDriver::Chrome::Features::CHROME_COMMANDS, Selenium::WebDriver::Chrome::Features::COMMANDS
Constants included from Selenium::WebDriver::Chromium::Features
Selenium::WebDriver::Chromium::Features::CHROMIUM_COMMANDS
Constants included from Selenium::WebDriver::Firefox::Features
Selenium::WebDriver::Firefox::Features::COMMANDS, Selenium::WebDriver::Firefox::Features::FIREFOX_COMMANDS
Constants included from Selenium::WebDriver::Edge::Features
Selenium::WebDriver::Edge::Features::COMMANDS, Selenium::WebDriver::Edge::Features::EDGE_COMMANDS
Constants included from Selenium::WebDriver::Safari::Features
Selenium::WebDriver::Safari::Features::COMMANDS, Selenium::WebDriver::Safari::Features::SAFARI_COMMANDS
Instance Attribute Summary collapse
-
#bidi ⇒ Object
readonly
steep:ignore:start.
Attributes inherited from Selenium::WebDriver::Remote::Bridge
#capabilities, #file_detector, #http
Instance Method Summary collapse
- #attach_to ⇒ Object
- #browsing_context ⇒ ::Selenium::WebDriver::BiDi::BrowsingContext
- #close ⇒ Object
-
#create_session(capabilities) ⇒ ::Appium::Core::Base::Capabilities
Override Creates session handling.
- #get(url) ⇒ Object
- #go_back ⇒ Object
- #go_forward ⇒ Object
- #quit ⇒ Object
- #refresh ⇒ Object
Methods inherited from Bridge
#action, #add_appium_prefix, #available_log_types, #browser, #camel_case, #command_list, #commands, #convert_to_element, #element_attribute, #element_displayed?, #element_screenshot, #extension_prefix?, #get_timeouts, #initialize, #json_create, #location, #log, #log_event, #log_events, #network_connection, #network_connection=, #selenium_bridge_accepts_url?, #send_command, #set_location, #status, #viewport_screenshot
Methods included from _Bridge
#bridge, #execute, #execute_async_script, #execute_script
Methods included from Device::DeviceLock
#device_locked?, #lock, #unlock
Methods included from Device::Keyboard
#hide_keyboard, #is_keyboard_shown
Methods included from Device::ImeActions
#ime_activate, #ime_activated, #ime_active_engine, #ime_available_engines, #ime_deactivate
Methods included from Device::Setting
#execute, #get_settings, #update_settings
Methods included from Device::Context
#available_contexts, #current_context, #execute, #set_context, #within_context
Methods included from Device::FileManagement
#execute, #pull_file, #pull_folder, #push_file
Methods included from Device::KeyEvent
#keyevent, #long_press_keycode, #press_keycode
Methods included from Device::ImageComparison
#compare_images, #execute, #find_image_occurrence, #get_images_similarity, #match_images_features
Methods included from Device::AppManagement
#activate_app, #app_installed?, #app_strings, #background_app, #install_app, #options?, #remove_app, #terminate_app
Methods included from Device::AppState
Methods included from Device::ScreenRecord::Command
#stop_and_save_recording_screen, #stop_recording_screen
Methods included from Device::Device
Methods included from Device::ExecuteDriver
Methods included from Device::Orientation
#execute, #screen_orientation, #screen_orientation=
Methods inherited from Selenium::WebDriver::Remote::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, #commands, #convert_locator, #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_id_from, #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, #escape_css, #escaper, #execute, #execute_async_script, #execute_script, extra_commands, #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, #prepare_capabilities_payload, #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, #shadow_root_id_from, #status, #submit_element, #switch_to_default_content, #switch_to_frame, #switch_to_parent_frame, #switch_to_window, #timeouts, #timeouts=, #title, #unwrap_script_result, #upload, #url, #user_verified, #window_handle, #window_handles, #window_position, #window_rect, #window_size
Methods included from Selenium::WebDriver::Chrome::Features
Methods included from Selenium::WebDriver::Chromium::Features
#available_log_types, #cast_issue_message, #cast_sink_to_use=, #cast_sinks, #commands, #delete_network_conditions, #launch_app, #log, #network_conditions, #network_conditions=, #send_command, #set_permission, #start_cast_desktop_mirroring, #start_cast_tab_mirroring, #stop_casting
Methods included from Selenium::WebDriver::Firefox::Features
#command_list, #commands, #context, #context=, #full_screenshot, #install_addon, #uninstall_addon
Methods included from Selenium::WebDriver::Edge::Features
Methods included from Selenium::WebDriver::Safari::Features
#attach_debugger, #command_list, #commands, #permissions, #permissions=
Methods included from _CommandList
Methods included from _Features
Methods included from Selenium::WebDriver::Atoms
#atom_script, #execute_atom, #read_atom
Constructor Details
This class inherits a constructor from Appium::Core::Base::Bridge
Instance Attribute Details
#bidi ⇒ Object (readonly)
steep:ignore:start
23 24 25 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 23 def bidi @bidi end |
Instance Method Details
#attach_to ⇒ Object
7 |
# File 'sig/lib/appium_lib_core/common/base/bidi_bridge.rbs', line 7
def attach_to: (untyped session_id, untyped platform_name, untyped automation_name) -> untyped
|
#browsing_context ⇒ ::Selenium::WebDriver::BiDi::BrowsingContext
94 95 96 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 94 def browsing_context @browsing_context ||= ::Selenium::WebDriver::BiDi::BrowsingContext.new(self) end |
#close ⇒ Object
86 87 88 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 86 def close execute(:close_window).tap { |handles| bidi.close if handles.empty? } end |
#create_session(capabilities) ⇒ ::Appium::Core::Base::Capabilities
Override Creates session handling.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 48 def create_session(capabilities) super return @capabilities if @capabilities.nil? begin socket_url = @capabilities[:web_socket_url] @bidi = ::Selenium::WebDriver::BiDi.new(url: socket_url) if socket_url rescue StandardError => e ::Appium::Logger.warn "WebSocket connection to #{socket_url} for BiDi failed. Error #{e}" raise end @capabilities end |
#get(url) ⇒ Object
64 65 66 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 64 def get(url) browsing_context.navigate(url) end |
#go_back ⇒ Object
68 69 70 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 68 def go_back browsing_context.traverse_history(-1) end |
#go_forward ⇒ Object
72 73 74 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 72 def go_forward browsing_context.traverse_history(1) end |
#quit ⇒ Object
80 81 82 83 84 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 80 def quit super ensure bidi.close end |
#refresh ⇒ Object
76 77 78 |
# File 'lib/appium_lib_core/common/base/bidi_bridge.rb', line 76 def refresh browsing_context.reload end |