diff --git a/lib/appium_lib_core/common/device/app_management.rb b/lib/appium_lib_core/common/device/app_management.rb index 706be79c..057b402a 100644 --- a/lib/appium_lib_core/common/device/app_management.rb +++ b/lib/appium_lib_core/common/device/app_management.rb @@ -29,7 +29,7 @@ def background_app(duration = 0) def install_app(path, options = {}) args = { appPath: path } - args[:options] = options unless options.empty? + args[:options] = options unless options&.empty? execute :install_app, {}, args end diff --git a/sig/gems/em.rbs b/sig/gems/em.rbs new file mode 100644 index 00000000..c81c887c --- /dev/null +++ b/sig/gems/em.rbs @@ -0,0 +1,5 @@ +module EM + def stop: () -> untyped + + def run: () -> untyped +end \ No newline at end of file diff --git a/sig/gems/faye.rbs b/sig/gems/faye.rbs new file mode 100644 index 00000000..0cbce268 --- /dev/null +++ b/sig/gems/faye.rbs @@ -0,0 +1,10 @@ +module Faye + module WebSocket + class Client + def initialize: (String, String, Hash[Symbol, untyped]) -> void + def close: () -> void + def send: (String) -> void + def on: (String, Proc) -> void + end + end +end \ No newline at end of file diff --git a/sig/gems/selenium/atoms.rbs b/sig/gems/selenium/atoms.rbs new file mode 100644 index 00000000..e825969f --- /dev/null +++ b/sig/gems/selenium/atoms.rbs @@ -0,0 +1,16 @@ +module Selenium + module WebDriver + module Atoms + include _Bridge + include _ExecuteScript + + def atom_script: (Symbol) -> String + + private + + def read_atom: (Symbol function) -> String + + def execute_atom: (Symbol function_name, [Element | String | Symbol] arguments) -> [Element | Integer | Float | bool | nil | String | Array[untyped]] + end + end +end diff --git a/sig/gems/selenium/bidi/browsing_context.rbs b/sig/gems/selenium/bidi/browsing_context.rbs new file mode 100644 index 00000000..a690a382 --- /dev/null +++ b/sig/gems/selenium/bidi/browsing_context.rbs @@ -0,0 +1,27 @@ +module Selenium + module WebDriver + class BiDi + class BrowsingContext + @bidi: untyped + + @id: untyped + + attr_accessor id: untyped + + READINESS_STATE: Hash[Symbol, String] + + def initialize: (driver: untyped, ?browsing_context_id: untyped?, ?type: untyped?, ?reference_context: untyped?) -> void + + def navigate: (url: untyped, ?readiness_state: untyped?) -> untyped + + def get_tree: (?max_depth: untyped?) -> untyped + + def close: () -> untyped + + private + + def create: (untyped type, untyped reference_context) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/bidi/browsing_context_info.rbs b/sig/gems/selenium/bidi/browsing_context_info.rbs new file mode 100644 index 00000000..1e0d1214 --- /dev/null +++ b/sig/gems/selenium/bidi/browsing_context_info.rbs @@ -0,0 +1,25 @@ +module Selenium + module WebDriver + class BiDi + class BrowsingContextInfo + @id: untyped + + @url: untyped + + @children: untyped + + @parent_browsing_context: untyped + + attr_accessor id: untyped + + attr_accessor url: untyped + + attr_accessor children: untyped + + attr_accessor parent_browsing_context: untyped + + def initialize: (id: untyped, url: untyped, children: untyped, parent_context: untyped) -> void + end + end + end +end diff --git a/sig/gems/selenium/bidi/log_inspector.rbs b/sig/gems/selenium/bidi/log_inspector.rbs new file mode 100644 index 00000000..565ec3aa --- /dev/null +++ b/sig/gems/selenium/bidi/log_inspector.rbs @@ -0,0 +1,33 @@ +module Selenium + module WebDriver + class BiDi + class LogInspector + @bidi: untyped + + EVENTS: Hash[Symbol, String] + + LOG_LEVEL: Hash[Symbol, String] + + def initialize: (untyped driver, ?untyped? browsing_context_ids) -> void + + def on_console_entry: (?untyped? filter_by) { () -> untyped } -> untyped + + def on_javascript_log: (?untyped? filter_by) { () -> untyped } -> untyped + + def on_javascript_exception: () { () -> untyped } -> untyped + + def on_log: (?untyped? filter_by) { (untyped) -> untyped } -> untyped? + + private + + def on: (untyped event) { () -> untyped } -> untyped + + def check_valid_filter: (untyped filter_by) -> (nil | untyped) + + def console_log_events: (untyped params, untyped filter_by) { (untyped) -> untyped } -> untyped? + + def javascript_log_events: (untyped params, untyped filter_by) { (untyped) -> untyped } -> untyped? + end + end + end +end diff --git a/sig/gems/selenium/bidi/navigate_result.rbs b/sig/gems/selenium/bidi/navigate_result.rbs new file mode 100644 index 00000000..54b4737e --- /dev/null +++ b/sig/gems/selenium/bidi/navigate_result.rbs @@ -0,0 +1,17 @@ +module Selenium + module WebDriver + class BiDi + class NavigateResult + @url: untyped + + @navigation_id: untyped + + attr_accessor url: untyped + + attr_accessor navigation_id: untyped + + def initialize: (url: untyped, navigation_id: untyped) -> void + end + end + end +end diff --git a/sig/gems/selenium/bidi/session.rbs b/sig/gems/selenium/bidi/session.rbs new file mode 100644 index 00000000..99b94c52 --- /dev/null +++ b/sig/gems/selenium/bidi/session.rbs @@ -0,0 +1,19 @@ +module Selenium + module WebDriver + class BiDi + class Session + @bidi: untyped + + Status: untyped + + def initialize: (untyped bidi) -> void + + def status: () -> untyped + + def subscribe: (untyped events, ?untyped? browsing_contexts) -> untyped + + def unsubscribe: (untyped events, ?untyped? browsing_contexts) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/bridge.rbs b/sig/gems/selenium/bridge.rbs new file mode 100644 index 00000000..4e06cbd6 --- /dev/null +++ b/sig/gems/selenium/bridge.rbs @@ -0,0 +1,275 @@ +module Selenium + module WebDriver + module Remote + class Bridge + include _CommandList + include _Features + + @bidi: WebDriver::BiDi + @http: untyped + + @file_detector: untyped + + @session_id: untyped + + @capabilities: untyped + + @browser: untyped + + @manage: untyped + + @escaper: untyped + + include Atoms + + PORT: Integer + + attr_accessor http: untyped + + attr_accessor file_detector: untyped + + attr_reader capabilities: untyped + + def initialize: (url: String | URI, ?http_client: untyped?) -> void + + def cancel_fedcm_dialog: -> nil + + def click_fedcm_dialog_button: -> nil + + def create_session: (untyped capabilities) -> untyped + + extend WebDriver::Chrome::Features + + extend WebDriver::Firefox::Features + + extend WebDriver::Edge::Features + + extend WebDriver::Safari::Features + + def fedcm_account_list: -> [FedCM::Account] + + def fedcm_dialog_type: -> String + + def fedcm_subtitle: -> String? + + def fedcm_title: -> String + + def reset_fedcm_cooldown: -> nil + + def select_fedcm_account: -> nil + + def session_id: () -> untyped + + def browser: () -> untyped + + def fedcm_delay: -> bool + + def status: () -> untyped + + def get: (untyped url) -> untyped + + def timeouts: () -> untyped + + def timeouts=: (untyped timeouts) -> untyped + + def accept_alert: () -> untyped + + def dismiss_alert: () -> untyped + + def alert=: (untyped keys) -> untyped + + def alert_text: () -> untyped + + def go_back: () -> untyped + + def go_forward: () -> untyped + + def url: () -> untyped + + def title: () -> untyped + + def page_source: () -> untyped + + def new_window: (untyped type) -> untyped + + def switch_to_window: (untyped name) -> untyped + + def switch_to_frame: (untyped id) -> untyped + + def switch_to_parent_frame: () -> untyped + + def switch_to_default_content: () -> untyped + + QUIT_ERRORS: ::Array[untyped] + + def quit: () -> untyped + + def close: () -> untyped + + def refresh: () -> untyped + + def window_handles: () -> untyped + + def window_handle: () -> untyped + + def resize_window: (untyped width, untyped height, ?::Symbol handle) -> untyped + + def window_size: (?::Symbol handle) -> untyped + + def minimize_window: () -> untyped + + def maximize_window: (?::Symbol handle) -> untyped + + def full_screen_window: () -> untyped + + def reposition_window: (untyped x, untyped y) -> untyped + + def window_position: () -> untyped + + def set_window_rect: (?x: untyped?, ?y: untyped?, ?width: untyped?, ?height: untyped?) -> untyped + + def window_rect: () -> untyped + + def screenshot: () -> untyped + + def element_screenshot: (untyped element) -> untyped + + def local_storage_item: (untyped key, ?untyped? value) -> untyped + + def remove_local_storage_item: (untyped key) -> untyped + + def local_storage_keys: () -> untyped + + def clear_local_storage: () -> untyped + + def local_storage_size: () -> untyped + + def session_storage_item: (untyped key, ?untyped? value) -> untyped + + def remove_session_storage_item: (untyped key) -> untyped + + def session_storage_keys: () -> untyped + + def clear_session_storage: () -> untyped + + def session_storage_size: () -> untyped + + def execute_script: (untyped script, *untyped args) -> untyped + + def execute_async_script: (untyped script, *untyped args) -> untyped + + def manage: () -> untyped + + def add_cookie: (untyped cookie) -> untyped + + def delete_cookie: (untyped name) -> untyped + + def cookie: (untyped name) -> untyped + + def cookies: () -> untyped + + def delete_all_cookies: () -> untyped + + def action: (?async: bool, ?devices: untyped, ?duration: ::Integer) -> untyped + + alias actions action + + def send_actions: (untyped data) -> untyped + + def release_actions: () -> untyped + + def print_page: (?::Hash[untyped, untyped] options) -> untyped + + def click_element: (untyped element) -> untyped + + def send_keys_to_element: (untyped element, untyped keys) -> untyped + + def upload: (untyped local_file) -> untyped + + def clear_element: (untyped element) -> untyped + + def submit_element: (untyped element) -> untyped + + def element_tag_name: (untyped element) -> untyped + + def element_attribute: (untyped element, untyped name) -> untyped + + def element_dom_attribute: (untyped element, untyped name) -> untyped + + def element_property: (untyped element, untyped name) -> untyped + + def element_aria_role: (untyped element) -> untyped + + def element_aria_label: (untyped element) -> untyped + + def element_value: (untyped element) -> untyped + + def element_text: (untyped element) -> untyped + + def element_location: (untyped element) -> untyped + + def element_rect: (untyped element) -> untyped + + def element_location_once_scrolled_into_view: (untyped element) -> untyped + + def element_size: (untyped element) -> untyped + + def element_enabled?: (untyped element) -> untyped + + def element_selected?: (untyped element) -> untyped + + def element_displayed?: (untyped element) -> untyped + + def element_value_of_css_property: (untyped element, untyped prop) -> untyped + + def active_element: () -> untyped + + alias switch_to_active_element active_element + + def find_element_by: (untyped how, untyped what, ?untyped parent_ref) -> untyped + + def find_elements_by: (untyped how, untyped what, ?untyped parent_ref) -> untyped + + def shadow_root: (untyped element) -> untyped + + def add_virtual_authenticator: (untyped options) -> untyped + + def remove_virtual_authenticator: (untyped id) -> untyped + + def add_credential: (untyped credential, untyped id) -> untyped + + def credentials: (untyped authenticator_id) -> untyped + + def remove_credential: (untyped credential_id, untyped authenticator_id) -> untyped + + def remove_all_credentials: (untyped authenticator_id) -> untyped + + def user_verified: (untyped verified, untyped authenticator_id) -> untyped + + private + + def execute: (untyped command, ?::Hash[untyped, untyped] opts, ?untyped? command_hash) -> WebDriver::Remote::Response + + def escaper: () -> untyped + + def commands: (untyped command) -> untyped + + def unwrap_script_result: (untyped arg) -> untyped + + def element_id_from: (untyped id) -> untyped + + def shadow_root_id_from: (untyped id) -> untyped + + def prepare_capabilities_payload: (untyped capabilities) -> { capabilities: untyped } + + def convert_locator: (untyped how, untyped what) -> ::Array[untyped] + + ESCAPE_CSS_REGEXP: ::Regexp + + UNICODE_CODE_POINT: 30 + + def escape_css: (untyped string) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/chrome/features.rbs b/sig/gems/selenium/chrome/features.rbs new file mode 100644 index 00000000..ab3e9c85 --- /dev/null +++ b/sig/gems/selenium/chrome/features.rbs @@ -0,0 +1,16 @@ +module Selenium + module WebDriver + module Chrome + module Features + include WebDriver::Chromium::Features + + CHROME_COMMANDS: Hash[Symbol, Array[Symbol | String]] + COMMANDS: Hash[Symbol, Array[Symbol | String]] + + def command_list: -> Hash[Symbol, Array[Symbol | String]] + + def commands: (Symbol command) -> Array[Symbol | String] + end + end + end +end diff --git a/sig/gems/selenium/chromium/features.rbs b/sig/gems/selenium/chromium/features.rbs new file mode 100644 index 00000000..a48cca64 --- /dev/null +++ b/sig/gems/selenium/chromium/features.rbs @@ -0,0 +1,42 @@ +module Selenium + module WebDriver + module Chromium + module Features + include _Bridge + + CHROMIUM_COMMANDS: Hash[Symbol, Array[Symbol | String]] + + def commands: (Symbol command) -> Array[Symbol | String] + + def launch_app: (String id) -> String + + def cast_sinks: () -> Array[String] + + def cast_sink_to_use=: (String name) -> untyped + + def cast_issue_message: () -> String + + def start_cast_tab_mirroring: (String name) -> untyped + + def start_cast_desktop_mirroring: (String name) -> untyped + + def stop_casting: (String name) -> untyped + + def set_permission: (String name, String value) -> untyped + + def network_conditions: () -> Hash[untyped, untyped] + + def network_conditions=: (Hash[Symbol | String, Integer | bool] conditions) -> untyped + + def delete_network_conditions: () -> untyped + + def send_command: (Hash[String | Symbol, untyped] command_params) -> untyped + + def available_log_types: () -> Array[Symbol] + + def log: (Symbol type) -> Array[Hash[String, untyped]] | + (Symbol type) -> Array[LogEntry] + end + end + end +end diff --git a/sig/gems/selenium/common/element.rbs b/sig/gems/selenium/common/element.rbs new file mode 100644 index 00000000..c534b1e0 --- /dev/null +++ b/sig/gems/selenium/common/element.rbs @@ -0,0 +1,65 @@ +module Selenium + module WebDriver + class Element + ELEMENT_KEY: ::String + + def inspect: () -> untyped + + def ==: (untyped other) -> bool + + alias eql? == + + def hash: () -> Integer + + def click: () -> untyped + + def tag_name: () -> untyped + + def attribute: (String | Symbol name) -> String? + + def dom_attribute: (String name) -> String? + + def property: (String name) -> String? + + def aria_role: () -> String + + def accessible_name: () -> String + + def text: () -> String + + def send_keys: (*untyped args) -> untyped + + alias send_key send_keys + + def clear: () -> bool + + def enabled?: () -> bool + + def selected?: () -> bool + + def displayed?: () -> bool + + def submit: () -> untyped + + def css_value: (String prop) -> untyped + + alias style css_value + + alias [] attribute + + def ref: () -> ::Array[:element | untyped] + + def to_json: () -> untyped + + def as_json: () -> untyped + + private + + attr_reader bridge: Remote::Bridge + + def selectable?: () -> bool + + def screenshot: () -> untyped + end + end +end diff --git a/sig/gems/selenium/edge/features.rbs b/sig/gems/selenium/edge/features.rbs new file mode 100644 index 00000000..accea1a3 --- /dev/null +++ b/sig/gems/selenium/edge/features.rbs @@ -0,0 +1,17 @@ +module Selenium + module WebDriver + module Edge + module Features + include WebDriver::Chromium::Features + + EDGE_COMMANDS: Hash[Symbol, Array[Symbol | String]] + + COMMANDS: untyped + + def command_list: -> untyped + + def commands: (untyped command) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/error.rbs b/sig/gems/selenium/error.rbs new file mode 100644 index 00000000..5fd5aa9a --- /dev/null +++ b/sig/gems/selenium/error.rbs @@ -0,0 +1,9 @@ +module Selenium + module WebDriver + module Error + module UnknownError + def message: -> String + end + end + end +end diff --git a/sig/gems/selenium/event_firing_bridge.rbs b/sig/gems/selenium/event_firing_bridge.rbs new file mode 100644 index 00000000..43cb36c8 --- /dev/null +++ b/sig/gems/selenium/event_firing_bridge.rbs @@ -0,0 +1,47 @@ +module Selenium + module WebDriver + module Support + class EventFiringBridge + @delegate: untyped + + @listener: untyped + + @driver: untyped + + def initialize: (untyped delegate, untyped listener) -> void + + def get: (untyped url) -> untyped + + def go_forward: () -> untyped + + def go_back: () -> untyped + + def click_element: (untyped ref) -> untyped + + def clear_element: (untyped ref) -> untyped + + def send_keys_to_element: (untyped ref, untyped keys) -> untyped + + def find_element_by: (untyped how, untyped what, ?untyped? parent) -> untyped + + def find_elements_by: (untyped how, untyped what, ?untyped? parent) -> untyped + + def execute_script: (untyped script, *untyped args) -> untyped + + def quit: () -> untyped + + def close: () -> untyped + + private + + def create_element: (untyped ref) -> untyped + + def driver: () -> untyped + + def dispatch: (untyped name, *untyped args) { () -> untyped } -> untyped + + def method_missing: (untyped meth, *untyped args) { () -> untyped } -> untyped + end + end + end +end diff --git a/sig/gems/selenium/firefox/driver.rbs b/sig/gems/selenium/firefox/driver.rbs new file mode 100644 index 00000000..7dd993e2 --- /dev/null +++ b/sig/gems/selenium/firefox/driver.rbs @@ -0,0 +1,21 @@ +module Selenium + module WebDriver + module Firefox + class Driver < WebDriver::Driver + EXTENSIONS: Array[untyped] + + include LocalDriver + + def initialize: (?options: untyped?, ?service: untyped?, ?url: untyped?, **untyped opts) -> void + + def browser: () -> Symbol + + private + + def devtools_url: () -> untyped + + def devtools_version: () -> untyped + end + end + end +end diff --git a/sig/gems/selenium/firefox/extension.rbs b/sig/gems/selenium/firefox/extension.rbs new file mode 100644 index 00000000..0a4979c7 --- /dev/null +++ b/sig/gems/selenium/firefox/extension.rbs @@ -0,0 +1,31 @@ +module Selenium + module WebDriver + module Firefox + class Extension + @path: untyped + + @should_reap_root: untyped + + NAMESPACE: String + + def initialize: (untyped path) -> void + + def write_to: (untyped extensions_dir) -> untyped + + private + + def create_root: () -> untyped + + def read_id: (untyped directory) -> untyped + + def read_id_from_install_rdf: (untyped directory) -> untyped? + + def read_id_from_manifest_json: (untyped directory) -> untyped? + + def applications_gecko_id: (untyped manifest) -> untyped + + def name_and_version: (untyped manifest) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/firefox/features.rbs b/sig/gems/selenium/firefox/features.rbs new file mode 100644 index 00000000..c8d12b93 --- /dev/null +++ b/sig/gems/selenium/firefox/features.rbs @@ -0,0 +1,25 @@ +module Selenium + module WebDriver + module Firefox + module Features + include _Bridge + COMMANDS: Hash[Symbol, Array[Symbol | String]] + FIREFOX_COMMANDS: Hash[Symbol, Array[Symbol | String]] + + def command_list: -> untyped + + def commands: (untyped command) -> untyped + + def install_addon: (untyped path, untyped temporary) -> untyped + + def uninstall_addon: (untyped id) -> untyped + + def full_screenshot: () -> untyped + + def context=: (untyped context) -> untyped + + def context: () -> untyped + end + end + end +end diff --git a/sig/gems/selenium/firefox/options.rbs b/sig/gems/selenium/firefox/options.rbs new file mode 100644 index 00000000..57be5cd1 --- /dev/null +++ b/sig/gems/selenium/firefox/options.rbs @@ -0,0 +1,8 @@ +module Selenium + module WebDriver + module Firefox + class Options + end + end + end +end diff --git a/sig/gems/selenium/firefox/profile.rbs b/sig/gems/selenium/firefox/profile.rbs new file mode 100644 index 00000000..58b93624 --- /dev/null +++ b/sig/gems/selenium/firefox/profile.rbs @@ -0,0 +1,77 @@ +module Selenium + module WebDriver + module Firefox + class Profile + WEBDRIVER_PREFS: untyped + + self.@ini: untyped + + @model: untyped + + @additional_prefs: untyped + + @extensions: untyped + + @log_file: untyped + + include ProfileHelper + + VALID_PREFERENCE_TYPES: Array[untyped] + + DEFAULT_PREFERENCES: Hash[String, bool | String] + + LOCK_FILES: Array[String] + + attr_reader name: untyped + + attr_reader log_file: untyped + + attr_writer secure_ssl: untyped + + attr_writer load_no_focus_lib: untyped + + def self.ini: () -> untyped + + def self.from_name: (untyped name) -> untyped + + def self.decoded: (untyped json) -> untyped + + def initialize: (?untyped? model) -> void + + def layout_on_disk: () -> untyped + + def []=: (untyped key, untyped value) -> untyped + + def port=: (untyped port) -> untyped + + def log_file=: (untyped file) -> untyped + + def add_extension: (untyped path, ?untyped name) -> untyped + + def proxy=: (untyped proxy) -> untyped + + alias as_json encoded + + private + + def set_manual_proxy_preference: (untyped key, untyped value) -> untyped? + + def install_extensions: (untyped directory) -> untyped + + def read_model_prefs: () -> (Hash[untyped, untyped] | untyped) + + def delete_extensions_cache: (untyped directory) -> untyped + + def delete_lock_files: (untyped directory) -> untyped + + def extension_name_for: (untyped path) -> untyped + + def update_user_prefs_in: (untyped directory) -> untyped + + def read_user_prefs: (untyped path) -> untyped + + def write_prefs: (untyped prefs, untyped path) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/firefox/profiles_ini.rbs b/sig/gems/selenium/firefox/profiles_ini.rbs new file mode 100644 index 00000000..09c93bd8 --- /dev/null +++ b/sig/gems/selenium/firefox/profiles_ini.rbs @@ -0,0 +1,23 @@ +module Selenium + module WebDriver + module Firefox + class ProfilesIni + @ini_path: untyped + + @profile_paths: untyped + + def initialize: () -> void + + def []: (untyped name) -> untyped + + def refresh: () -> untyped + + private + + def parse: () -> untyped + + def path_for: (untyped name, untyped is_relative, untyped path) -> untyped? + end + end + end +end diff --git a/sig/gems/selenium/firefox/service.rbs b/sig/gems/selenium/firefox/service.rbs new file mode 100644 index 00000000..288a1a43 --- /dev/null +++ b/sig/gems/selenium/firefox/service.rbs @@ -0,0 +1,6 @@ +module Selenium + module WebDriver + module Firefox + end + end +end diff --git a/sig/gems/selenium/firefox/util.rbs b/sig/gems/selenium/firefox/util.rbs new file mode 100644 index 00000000..42b3b6d4 --- /dev/null +++ b/sig/gems/selenium/firefox/util.rbs @@ -0,0 +1,12 @@ +module Selenium + module WebDriver + module Firefox + # @api private + module Util + def self?.app_data_path: () -> untyped + + def self?.stringified?: (untyped str) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/ie/features.rbs b/sig/gems/selenium/ie/features.rbs new file mode 100644 index 00000000..301366c8 --- /dev/null +++ b/sig/gems/selenium/ie/features.rbs @@ -0,0 +1,13 @@ +module Selenium + module WebDriver + module IE + module Features + COMMANDS: untyped + + def command_list: () -> untyped + + def commands: (untyped command) -> untyped + end + end + end +end diff --git a/sig/gems/selenium/interactions.rbs b/sig/gems/selenium/interactions.rbs new file mode 100644 index 00000000..547e2a93 --- /dev/null +++ b/sig/gems/selenium/interactions.rbs @@ -0,0 +1,11 @@ +module Selenium + module WebDriver + class Interactions + def key: (String key) -> untyped + end + + class Point + def initialize: (Integer x, Integer y) -> untyped + end + end +end diff --git a/sig/gems/selenium/interfaces/commands.rbs b/sig/gems/selenium/interfaces/commands.rbs new file mode 100644 index 00000000..87653989 --- /dev/null +++ b/sig/gems/selenium/interfaces/commands.rbs @@ -0,0 +1,3 @@ +interface _Commands + def commands: (untyped command) -> untyped +end diff --git a/sig/gems/selenium/interfaces/commands_list.rbs b/sig/gems/selenium/interfaces/commands_list.rbs new file mode 100644 index 00000000..356b9272 --- /dev/null +++ b/sig/gems/selenium/interfaces/commands_list.rbs @@ -0,0 +1,3 @@ +interface _CommandList + def command_list: () -> untyped +end diff --git a/sig/gems/selenium/interfaces/devtools.rbs b/sig/gems/selenium/interfaces/devtools.rbs new file mode 100644 index 00000000..4c65a129 --- /dev/null +++ b/sig/gems/selenium/interfaces/devtools.rbs @@ -0,0 +1,3 @@ +interface _ExecuteScript + def execute_script: (untyped, *untyped) -> untyped +end diff --git a/sig/gems/selenium/interfaces/driver.rbs b/sig/gems/selenium/interfaces/driver.rbs new file mode 100644 index 00000000..4089947d --- /dev/null +++ b/sig/gems/selenium/interfaces/driver.rbs @@ -0,0 +1,17 @@ +interface _Driver + def capabilities: () -> untyped + + def devtools_url: () -> untyped + + def devtools_version: () -> untyped + + def devtools_address: () -> untyped + + def ref: () -> untyped + + def bridge: () -> untyped + + def browser: () -> untyped + + def service_url: (untyped service) -> untyped +end diff --git a/sig/gems/selenium/interfaces/features.rbs b/sig/gems/selenium/interfaces/features.rbs new file mode 100644 index 00000000..42d59006 --- /dev/null +++ b/sig/gems/selenium/interfaces/features.rbs @@ -0,0 +1,3 @@ +interface _Features + def upload_if_necessary: (untyped keys) -> untyped +end diff --git a/sig/gems/selenium/local_driver.rbs b/sig/gems/selenium/local_driver.rbs new file mode 100644 index 00000000..ef1ac98c --- /dev/null +++ b/sig/gems/selenium/local_driver.rbs @@ -0,0 +1,11 @@ +module Selenium + module WebDriver + module LocalDriver + include _Driver + + def initialize_local_driver: (untyped options, untyped service, untyped url) -> Array[untyped] + + def process_options: (untyped options, untyped service) -> untyped + end + end +end diff --git a/sig/gems/selenium/platform.rbs b/sig/gems/selenium/platform.rbs new file mode 100644 index 00000000..6c83fd0e --- /dev/null +++ b/sig/gems/selenium/platform.rbs @@ -0,0 +1,6 @@ +module Selenium + module WebDriver + module Platform + end + end +end diff --git a/sig/gems/selenium/profile_helper.rbs b/sig/gems/selenium/profile_helper.rbs new file mode 100644 index 00000000..f81c65d3 --- /dev/null +++ b/sig/gems/selenium/profile_helper.rbs @@ -0,0 +1,6 @@ +module Selenium + module WebDriver + module ProfileHelper + end + end +end diff --git a/sig/gems/selenium/default.rbs b/sig/gems/selenium/remote/bridge/commands.rbs similarity index 52% rename from sig/gems/selenium/default.rbs rename to sig/gems/selenium/remote/bridge/commands.rbs index 5177998f..35ea1697 100644 --- a/sig/gems/selenium/default.rbs +++ b/sig/gems/selenium/remote/bridge/commands.rbs @@ -1,9 +1,8 @@ module Selenium module WebDriver module Remote - module Http - class Default - end + class Bridge + COMMANDS: Hash[Symbol, Array[Symbol | String]] end end end diff --git a/sig/gems/selenium/capabilities.rbs b/sig/gems/selenium/remote/capabilities.rbs similarity index 64% rename from sig/gems/selenium/capabilities.rbs rename to sig/gems/selenium/remote/capabilities.rbs index 1f86f726..b5dc63fa 100644 --- a/sig/gems/selenium/capabilities.rbs +++ b/sig/gems/selenium/remote/capabilities.rbs @@ -1,8 +1,8 @@ module Selenium module WebDriver module Remote - class Capabilities - end + class Capabilities + end end end end diff --git a/sig/gems/selenium/remote/http/common.rbs b/sig/gems/selenium/remote/http/common.rbs new file mode 100644 index 00000000..340ee0e3 --- /dev/null +++ b/sig/gems/selenium/remote/http/common.rbs @@ -0,0 +1,39 @@ +module Selenium + module WebDriver + module Remote + module Http + class Common + MAX_REDIRECTS: Integer + + CONTENT_TYPE: String + + DEFAULT_HEADERS: Hash[String, untyped] + + attr_writer server_url: untyped + + def quit_errors: () -> Array[untyped] + + def close: () -> untyped + + def call: (untyped verb, untyped url, untyped command_hash) -> untyped + + def self.extra_headers: () -> untyped + + def self.extra_headers=: (Hash[String, untyped]) -> untyped + + def self.user_agent: () -> untyped + + def self.user_agent=: (String) -> untyped + + private + + def server_url: () -> untyped + + def request: (*untyped) -> untyped + + def create_response: (untyped code, untyped body, untyped content_type) -> untyped + end + end + end + end +end diff --git a/sig/gems/selenium/remote/http/default.rbs b/sig/gems/selenium/remote/http/default.rbs new file mode 100644 index 00000000..7fb7a41c --- /dev/null +++ b/sig/gems/selenium/remote/http/default.rbs @@ -0,0 +1,48 @@ +module Selenium + module WebDriver + module Remote + module Http + # @api private + class Default < Common + @open_timeout: untyped + + @read_timeout: untyped + + @http: untyped + + @proxy: untyped + + attr_writer proxy: untyped + + attr_accessor open_timeout: untyped + + attr_accessor read_timeout: untyped + + def initialize: (?open_timeout: untyped?, ?read_timeout: untyped?) -> void + + def close: () -> untyped + + private + + def http: () -> untyped + + def start: (untyped http) -> untyped + + MAX_RETRIES: Integer + + def request: (untyped verb, untyped url, untyped headers, untyped payload, ?::Integer redirects) -> untyped + + def new_request_for: (untyped verb, untyped url, untyped headers, untyped payload) -> untyped + + def response_for: (untyped request) -> untyped + + def new_http_client: () -> untyped + + def proxy: () -> untyped + + def use_proxy?: () -> untyped + end + end + end + end +end diff --git a/sig/gems/selenium/common.rbs b/sig/gems/selenium/remote/response.rbs similarity index 61% rename from sig/gems/selenium/common.rbs rename to sig/gems/selenium/remote/response.rbs index d8843d9a..c0fd1990 100644 --- a/sig/gems/selenium/common.rbs +++ b/sig/gems/selenium/remote/response.rbs @@ -1,9 +1,7 @@ module Selenium module WebDriver module Remote - module Http - class Common - end + class Response end end end diff --git a/sig/gems/selenium/safari/features.rbs b/sig/gems/selenium/safari/features.rbs new file mode 100644 index 00000000..30e3d2d2 --- /dev/null +++ b/sig/gems/selenium/safari/features.rbs @@ -0,0 +1,23 @@ +module Selenium + module WebDriver + module Safari + module Features + include _Bridge + + SAFARI_COMMANDS: Hash[Symbol, Array[Symbol | String]] + + COMMANDS: untyped + + def command_list: -> untyped + + def commands: (untyped command) -> untyped + + def permissions: () -> untyped + + def permissions=: (untyped permissions) -> untyped + + def attach_debugger: () -> untyped + end + end + end +end diff --git a/sig/gems/selenium/search_context.rbs b/sig/gems/selenium/search_context.rbs new file mode 100644 index 00000000..5f8f2271 --- /dev/null +++ b/sig/gems/selenium/search_context.rbs @@ -0,0 +1,17 @@ +module Selenium + module WebDriver + module SearchContext + include _Driver + + FINDERS: untyped + + def find_element: (*untyped args) -> untyped + + def find_elements: (*untyped args) -> untyped + + private + + def extract_args: (untyped args) -> untyped + end + end +end diff --git a/sig/interfaces/bridge.rbs b/sig/interfaces/bridge.rbs new file mode 100644 index 00000000..8caa4c7b --- /dev/null +++ b/sig/interfaces/bridge.rbs @@ -0,0 +1,5 @@ +interface _Bridge + def bridge: -> untyped + + def execute: (untyped command, ?Hash[untyped, untyped] opts, ?untyped? command_hash) -> untyped +end diff --git a/sig/lib/appium_lib_core/android/device.rbs b/sig/lib/appium_lib_core/android/device.rbs new file mode 100644 index 00000000..f63ff529 --- /dev/null +++ b/sig/lib/appium_lib_core/android/device.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Android + module Device + extend Forwardable + + def self.execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.extended: (untyped _mod) -> (nil | untyped) + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/device/auth_finger_print.rbs b/sig/lib/appium_lib_core/android/device/auth_finger_print.rbs new file mode 100644 index 00000000..757f0d55 --- /dev/null +++ b/sig/lib/appium_lib_core/android/device/auth_finger_print.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Android + module Device + module Authentication + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/device/clipboard.rbs b/sig/lib/appium_lib_core/android/device/clipboard.rbs new file mode 100644 index 00000000..76eae50e --- /dev/null +++ b/sig/lib/appium_lib_core/android/device/clipboard.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Android + module Device + module Clipboard + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/device/emulator.rbs b/sig/lib/appium_lib_core/android/device/emulator.rbs new file mode 100644 index 00000000..7c8e7b42 --- /dev/null +++ b/sig/lib/appium_lib_core/android/device/emulator.rbs @@ -0,0 +1,23 @@ +module Appium + module Core + module Android + module Device + module Emulator + GSM_CALL_ACTIONS: ::Array[:call | :accept | :cancel | :hold] + + GSM_VOICE_STATES: ::Array[:on | :off | :denied | :searching | :roaming | :home | :unregistered] + + GSM_SIGNALS: { none_or_unknown: 0, poor: 1, moderate: 2, good: 3, great: 4 } + + NET_SPEED: ::Array[:gsm | :scsd | :gprs | :edge | :umts | :hsdpa | :lte | :evdo | :full] + + POWER_AC_STATE: ::Array[:on | :off] + + def self.add_methods: () -> untyped + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/device/network.rbs b/sig/lib/appium_lib_core/android/device/network.rbs new file mode 100644 index 00000000..0918257b --- /dev/null +++ b/sig/lib/appium_lib_core/android/device/network.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Android + module Device + module Network + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/device/performance.rbs b/sig/lib/appium_lib_core/android/device/performance.rbs new file mode 100644 index 00000000..20c0e290 --- /dev/null +++ b/sig/lib/appium_lib_core/android/device/performance.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Android + module Device + module Performance + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/device/screen.rbs b/sig/lib/appium_lib_core/android/device/screen.rbs new file mode 100644 index 00000000..9199fbd1 --- /dev/null +++ b/sig/lib/appium_lib_core/android/device/screen.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Android + module Device + module Screen + def self.add_methods: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/espresso/bridge.rbs b/sig/lib/appium_lib_core/android/espresso/bridge.rbs new file mode 100644 index 00000000..4bf68e87 --- /dev/null +++ b/sig/lib/appium_lib_core/android/espresso/bridge.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Android + module Espresso + module Bridge + def self.for: (untyped target) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/uiautomator1/bridge.rbs b/sig/lib/appium_lib_core/android/uiautomator1/bridge.rbs new file mode 100644 index 00000000..e7b8501a --- /dev/null +++ b/sig/lib/appium_lib_core/android/uiautomator1/bridge.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Android + module Uiautomator1 + module Bridge + def self.for: (untyped target) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/uiautomator2/bridge.rbs b/sig/lib/appium_lib_core/android/uiautomator2/bridge.rbs new file mode 100644 index 00000000..1b032baa --- /dev/null +++ b/sig/lib/appium_lib_core/android/uiautomator2/bridge.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Android + module Uiautomator2 + module Bridge + def self.for: (untyped target) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/android/uiautomator2/device/battery.rbs b/sig/lib/appium_lib_core/android/uiautomator2/device/battery.rbs new file mode 100644 index 00000000..6a323fb6 --- /dev/null +++ b/sig/lib/appium_lib_core/android/uiautomator2/device/battery.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Android + module Uiautomator2 + module Device + module Battery + def self.add_methods: () -> untyped + end + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/base/bridge.rbs b/sig/lib/appium_lib_core/common/base/bridge.rbs new file mode 100644 index 00000000..35714957 --- /dev/null +++ b/sig/lib/appium_lib_core/common/base/bridge.rbs @@ -0,0 +1,206 @@ +module Appium + module Core + class Base + class LocatorConverter + def convert: (untyped how, untyped what) -> ::Array[untyped] + end + + class Bridge < ::Selenium::WebDriver::Remote::Bridge + @browser: untyped + + @available_commands: untyped + + @session_id: untyped + + # generate a dummy capabilities instance which only has the given platformName and automationName + @capabilities: untyped + + include Device::DeviceLock + + include Device::Keyboard + + include Device::ImeActions + + include Device::Setting + + include Device::Context + + include Device::FileManagement + + include Device::KeyEvent + + include Device::ImageComparison + + include Device::AppManagement + + include Device::AppState + + include Device::ScreenRecord::Command + + include Device::Device + + include Device::ExecuteDriver + + include Device::Orientation + + # Prefix for extra capability defined by W3C + APPIUM_PREFIX: "appium:" + + # No 'browserName' means the session is native appium connection + APPIUM_NATIVE_BROWSER_NAME: "appium" + + attr_reader available_commands: untyped + + def browser: () -> untyped + + # Appium only. + # Attach to an existing session. + # + # @param [String] The session id to attach to. + # @param [String] platform_name The platform name to keep in the dummy capabilities + # @param [String] platform_name The automation name to keep in the dummy capabilities + # @return [::Appium::Core::Base::Capabilities] + # + # @example + # + # new_driver = ::Appium::Core::Driver.attach_to( + # driver.session_id, + # url: 'http://127.0.0.1:4723/wd/hub', automation_name: 'UiAutomator2', platform_name: 'Android' + # ) + # + def attach_to: (untyped session_id, untyped platform_name, untyped automation_name) -> untyped + + # Override + # Creates session handling. + # + # @param [::Appium::Core::Base::Capabilities, Hash] capabilities A capability + # @return [::Appium::Core::Base::Capabilities] + # + # @example + # + # opts = { + # caps: { + # platformName: :ios, + # automationName: 'XCUITest', + # app: 'test/functional/app/UICatalog.app.zip', + # platformVersion: '11.4', + # deviceName: 'iPhone Simulator', + # useNewWDA: true, + # }, + # appium_lib: { + # wait: 30 + # } + # } + # core = ::Appium::Core.for(caps) + # driver = core.start_driver + # + def create_session: (untyped capabilities) -> untyped + + # Append +appium:+ prefix for Appium following W3C spec + # https://www.w3.org/TR/webdriver/#dfn-validate-capabilities + # + # @param [::Appium::Core::Base::Capabilities, Hash] capabilities A capability + # @return [::Appium::Core::Base::Capabilities] + def add_appium_prefix: (untyped capabilities) -> untyped + + private + + def camel_case: (untyped str_or_sym) -> untyped + + def extension_prefix?: (untyped capability_name) -> untyped + + def json_create: (untyped value) -> untyped + + public + + def add_command: (method: untyped, url: untyped, name: untyped) { (?) -> untyped } -> untyped + + def commands: (untyped command) -> untyped + + def status: () -> untyped + + # Perform 'touch' actions for W3C module. + # Generate +touch+ pointer action here and users can use this via +driver.action+ + # - https://www.selenium.dev/documentation/webdriver/actions_api/ + # - https://www.selenium.dev/selenium/docs/api/rb/Selenium/WebDriver/ActionBuilder.html + # - https://www.selenium.dev/selenium/docs/api/rb/Selenium/WebDriver/PointerActions.html + # - https://www.selenium.dev/selenium/docs/api/rb/Selenium/WebDriver/KeyActions.html + # + # The pointer type is 'touch' by default in the Appium Ruby client. + # + # @example + # + # element = @driver.find_element(:id, "some id") + # @driver.action.click(element).perform # The 'click' is a part of 'PointerActions' + # + def action: (?untyped? _deprecated_async, ?async: bool, ?devices: untyped?) -> untyped + + # Port from MJSONWP + def get_timeouts: () -> untyped + + # For Appium + # override + def element_displayed?: (untyped element) -> untyped + + # For Appium + # override + def element_attribute: (untyped element, untyped name) -> untyped + + # For Appium + alias switch_to_active_element active_element + + # For Appium + # @param [Hash] id The id which can get as a response from server + # @return [::Appium::Core::Element] + def convert_to_element: (untyped id) -> untyped + + # For Appium + # override + # called in 'extend DriverExtensions::HasNetworkConnection' + def network_connection: () -> untyped + + # For Appium + # override + # called in 'extend DriverExtensions::HasNetworkConnection' + def network_connection=: (untyped type) -> untyped + + # For Appium + # No implementation for W3C webdriver module + # called in 'extend DriverExtensions::HasLocation' + def location: () -> untyped + + # For Appium + # No implementation for W3C webdriver module + def set_location: (untyped lat, untyped lon, ?::Float alt, ?speed: untyped?, ?satellites: untyped?) -> untyped + + # + # logs + # + # For Appium + # No implementation for W3C webdriver module + def available_log_types: () -> untyped + + # For Appium + # No implementation for W3C webdriver module + def log: (untyped type) -> untyped + + # For Appium + def log_event: (untyped vendor, untyped event) -> untyped + + # For Appium + def log_events: (?untyped? type) -> untyped + + def viewport_screenshot: () -> untyped + + def element_screenshot: (untyped element_id) -> untyped + + # for selenium-webdriver compatibility in chrome browser session. + # This may be needed in selenium-webdriver 4.8 or over? (around the version) + # when a session starts browserName: 'chrome' for bridge. + # This method is not only for Android, but also chrome desktop browser as well. + # So this bridge itself does not restrict the target module. + def send_command: (untyped command_params) -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/base/device_ime.rbs b/sig/lib/appium_lib_core/common/base/device_ime.rbs new file mode 100644 index 00000000..455f311f --- /dev/null +++ b/sig/lib/appium_lib_core/common/base/device_ime.rbs @@ -0,0 +1,25 @@ +module Appium + module Core + class Base + # + # @api private + # + class DeviceIME + @bridge: untyped + + # @private this class is private + def initialize: (untyped bridge) -> void + + def activate: (untyped ime_name) -> untyped + + def available_engines: () -> untyped + + def active_engine: () -> untyped + + def activated?: () -> untyped + + def deactivate: () -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/base/remote_status.rbs b/sig/lib/appium_lib_core/common/base/remote_status.rbs index d4abd610..bafd9010 100644 --- a/sig/lib/appium_lib_core/common/base/remote_status.rbs +++ b/sig/lib/appium_lib_core/common/base/remote_status.rbs @@ -2,6 +2,8 @@ module Appium module Core class Base module HasRemoteStatus + include _Bridge + def remote_status: () -> untyped end end diff --git a/sig/lib/appium_lib_core/common/base/screenshot.rbs b/sig/lib/appium_lib_core/common/base/screenshot.rbs index 139139a4..d5d43aa7 100644 --- a/sig/lib/appium_lib_core/common/base/screenshot.rbs +++ b/sig/lib/appium_lib_core/common/base/screenshot.rbs @@ -2,6 +2,8 @@ module Appium module Core class Base module TakesScreenshot + include _Bridge + def save_screenshot: (untyped png_path) -> untyped def screenshot_as: (untyped format) -> untyped diff --git a/sig/lib/appium_lib_core/common/base/search_context.rbs b/sig/lib/appium_lib_core/common/base/search_context.rbs new file mode 100644 index 00000000..3bcda524 --- /dev/null +++ b/sig/lib/appium_lib_core/common/base/search_context.rbs @@ -0,0 +1 @@ +APPIUM_EXTRA_FINDERS: { accessibility_id: "accessibility id", image: "-image", custom: "-custom", uiautomator: "-android uiautomator", viewtag: "-android viewtag", data_matcher: "-android datamatcher", view_matcher: "-android viewmatcher", predicate: "-ios predicate string", class_chain: "-ios class chain" } diff --git a/sig/lib/appium_lib_core/common/command.rbs b/sig/lib/appium_lib_core/common/command.rbs new file mode 100644 index 00000000..bbe41e7b --- /dev/null +++ b/sig/lib/appium_lib_core/common/command.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Commands + COMMAND: Hash[Symbol, Array[Symbol | String]] + + COMMAND_ANDROID: Hash[Symbol, Array[Symbol | String]] + + COMMAND_IOS: Hash[Symbol, Array[Symbol | String]] + + COMMANDS: untyped + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/app_management.rbs b/sig/lib/appium_lib_core/common/device/app_management.rbs new file mode 100644 index 00000000..fa0acef0 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/app_management.rbs @@ -0,0 +1,29 @@ +module Appium + module Core + class Base + module Device + module AppManagement + include _Bridge + + def app_strings: (?untyped? language) -> untyped + + def background_app: (Integer? duration) -> untyped + + def install_app: (untyped path, Hash[untyped, untyped]? options) -> untyped + + def remove_app: (untyped id, ?keep_data: untyped?, ?timeout: untyped?) -> untyped + + def app_installed?: (untyped app_id) -> untyped + + def activate_app: (untyped app_id) -> untyped + + def terminate_app: (untyped app_id, ?timeout: untyped?) -> untyped + + private + + def options?: (*untyped args) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/app_state.rbs b/sig/lib/appium_lib_core/common/device/app_state.rbs new file mode 100644 index 00000000..f53207cd --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/app_state.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + class Base + module Device + module AppState + STATUS: ::Array[:not_installed | :not_running | :running_in_background_suspended | :running_in_background | :running_in_foreground] + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def app_state: (untyped app_id) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/clipboard_content_type.rbs b/sig/lib/appium_lib_core/common/device/clipboard_content_type.rbs new file mode 100644 index 00000000..827394e9 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/clipboard_content_type.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + class Base + module Device + module Clipboard + CONTENT_TYPE: ::Array[:plaintext | :image | :url] + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/context.rbs b/sig/lib/appium_lib_core/common/device/context.rbs new file mode 100644 index 00000000..f768bb5d --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/context.rbs @@ -0,0 +1,19 @@ +module Appium + module Core + class Base + module Device + module Context + def within_context: (untyped context) ?{ () -> untyped } -> untyped + + def current_context: () -> untyped + + def available_contexts: () -> untyped + + def set_context: (?untyped? context) -> untyped + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/device.rbs b/sig/lib/appium_lib_core/common/device/device.rbs new file mode 100644 index 00000000..1102609e --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/device.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + class Base + module Device + module Device + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def shake: () -> untyped + + def device_time: (?untyped? format) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/device_lock.rbs b/sig/lib/appium_lib_core/common/device/device_lock.rbs new file mode 100644 index 00000000..c12220b6 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/device_lock.rbs @@ -0,0 +1,17 @@ +module Appium + module Core + class Base + module Device + module DeviceLock + def lock: (?untyped? duration) -> untyped + + def device_locked?: () -> untyped + + def unlock: () -> untyped + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/execute_driver.rbs b/sig/lib/appium_lib_core/common/device/execute_driver.rbs new file mode 100644 index 00000000..8c9e1102 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/execute_driver.rbs @@ -0,0 +1,25 @@ +module Appium + module Core + class Base + module Device + module ExecuteDriver + class Result + @result: untyped + + @logs: untyped + + attr_reader result: untyped + + attr_reader logs: untyped + + def initialize: (untyped response) -> void + end + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def execute_driver: (?script: ::String, ?type: ::String, ?timeout_ms: untyped?) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/file_management.rbs b/sig/lib/appium_lib_core/common/device/file_management.rbs new file mode 100644 index 00000000..0b1685b7 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/file_management.rbs @@ -0,0 +1,17 @@ +module Appium + module Core + class Base + module Device + module FileManagement + def push_file: (untyped path, untyped filedata) -> untyped + + def pull_file: (untyped path) -> untyped + + def pull_folder: (untyped path) -> untyped + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/image_comparison.rbs b/sig/lib/appium_lib_core/common/device/image_comparison.rbs new file mode 100644 index 00000000..9255eac4 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/image_comparison.rbs @@ -0,0 +1,27 @@ +module Appium + module Core + class Base + module Device + module ImageComparison + MODE: Array[Symbol] + + MATCH_FEATURES: { detector_name: untyped } + + MATCH_TEMPLATE: { visualize: Array[bool] } + + GET_SIMILARITY: { visualize: Array[bool] } + + def match_images_features: (first_image: untyped, second_image: untyped, ?detector_name: ::String, ?match_func: ::String, ?good_matches_factor: untyped?, ?visualize: bool) -> untyped + + def find_image_occurrence: (full_image: untyped, partial_image: untyped, ?visualize: bool, ?threshold: untyped?, ?multiple: untyped?, ?match_neighbour_threshold: untyped?) -> untyped + + def get_images_similarity: (first_image: untyped, second_image: untyped, ?visualize: bool) -> untyped + + def compare_images: (first_image: untyped, second_image: untyped, ?mode: ::Symbol, ?options: untyped?) -> untyped + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/ime_actions.rbs b/sig/lib/appium_lib_core/common/device/ime_actions.rbs new file mode 100644 index 00000000..0b8e6146 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/ime_actions.rbs @@ -0,0 +1,21 @@ +module Appium + module Core + class Base + module Device + module ImeActions + include _Bridge + + def ime_activate: (untyped ime_name) -> untyped + + def ime_available_engines: () -> untyped + + def ime_active_engine: () -> untyped + + def ime_activated: () -> untyped + + def ime_deactivate: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/keyboard.rbs b/sig/lib/appium_lib_core/common/device/keyboard.rbs new file mode 100644 index 00000000..52c9ccd5 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/keyboard.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + class Base + module Device + module Keyboard + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def hide_keyboard: (?untyped? close_key, ?untyped? strategy) -> untyped + + def is_keyboard_shown: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/keyevent.rbs b/sig/lib/appium_lib_core/common/device/keyevent.rbs new file mode 100644 index 00000000..494ca13e --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/keyevent.rbs @@ -0,0 +1,17 @@ +module Appium + module Core + class Base + module Device + module KeyEvent + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def keyevent: (untyped key, ?untyped? metastate) -> untyped + + def press_keycode: (untyped key, ?metastate: untyped, ?flags: untyped) -> untyped + + def long_press_keycode: (untyped key, ?metastate: untyped, ?flags: untyped) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/orientation.rbs b/sig/lib/appium_lib_core/common/device/orientation.rbs new file mode 100644 index 00000000..6cc6736a --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/orientation.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + class Base + module Device + module Orientation + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def screen_orientation=: (untyped orientation) -> untyped + + def screen_orientation: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/screen_record.rbs b/sig/lib/appium_lib_core/common/device/screen_record.rbs new file mode 100644 index 00000000..40200222 --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/screen_record.rbs @@ -0,0 +1,23 @@ +module Appium + module Core + class Base + module Device + class ScreenRecord + @upload_option: untyped + + attr_reader upload_option: untyped + + METHOD: ::Array["POST" | "PUT"] + + def initialize: (?remote_path: untyped?, ?user: untyped?, ?pass: untyped?, ?method: ::String, ?file_field_name: untyped?, ?form_fields: untyped?, ?headers: untyped?, ?force_restart: untyped?) -> void + + module Command + def stop_recording_screen: (?remote_path: untyped?, ?user: untyped?, ?pass: untyped?, ?method: ::String, ?file_field_name: untyped?, ?form_fields: untyped?, ?headers: untyped?) -> untyped + + def stop_and_save_recording_screen: (untyped file_path) -> untyped + end + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/device/setting.rbs b/sig/lib/appium_lib_core/common/device/setting.rbs new file mode 100644 index 00000000..0eca418d --- /dev/null +++ b/sig/lib/appium_lib_core/common/device/setting.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + class Base + module Device + module Setting + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def get_settings: () -> untyped + + def update_settings: (untyped settings) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/error.rbs b/sig/lib/appium_lib_core/common/error.rbs new file mode 100644 index 00000000..0338dfcf --- /dev/null +++ b/sig/lib/appium_lib_core/common/error.rbs @@ -0,0 +1,26 @@ +module Appium + module Core + module Error + class CoreError < StandardError + end + + class NotSupportedAppiumServer < CoreError + end + + class NoSuchElementError < CoreError + end + + class UnsupportedOperationError < CoreError + end + + class ServerError < CoreError + end + + class SessionNotCreatedError < CoreError + end + + class ArgumentError < CoreError + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/log.rbs b/sig/lib/appium_lib_core/common/log.rbs new file mode 100644 index 00000000..9a3eec6d --- /dev/null +++ b/sig/lib/appium_lib_core/common/log.rbs @@ -0,0 +1,19 @@ +module Appium + module Core + class Logs + @bridge: untyped + + def initialize: (untyped bridge) -> void + + def get: (untyped type) -> untyped + + def available_types: () -> untyped + + def event: (vendor: untyped, event: untyped) -> untyped + + def event=: (untyped log_event) -> untyped + + def events: (?untyped? type) -> untyped + end + end +end diff --git a/sig/lib/appium_lib_core/common/logger.rbs b/sig/lib/appium_lib_core/common/logger.rbs new file mode 100644 index 00000000..33e1e8a9 --- /dev/null +++ b/sig/lib/appium_lib_core/common/logger.rbs @@ -0,0 +1,23 @@ +module Appium + module Logger + self.@logger: untyped + + extend Forwardable + + attr_writer self.logger: untyped + + def self.debug: (String message) -> untyped + + def self.info: (String message) -> untyped + + def self.warn: (String message) -> untyped + + def self.error: (String message) -> untyped + + def self.fatal: (String message) -> untyped + + private + + def self.logger: () -> untyped + end +end diff --git a/sig/lib/appium_lib_core/common/wait/timer.rbs b/sig/lib/appium_lib_core/common/wait/timer.rbs new file mode 100644 index 00000000..d47ab02b --- /dev/null +++ b/sig/lib/appium_lib_core/common/wait/timer.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + module Wait + class Timer + @end_time: untyped + + def initialize: (Numeric timeout) -> void + + def timeout?: () -> bool + + def current_time: () -> Float + end + end + end +end diff --git a/sig/lib/appium_lib_core/common/ws/websocket.rbs b/sig/lib/appium_lib_core/common/ws/websocket.rbs new file mode 100644 index 00000000..f8be4883 --- /dev/null +++ b/sig/lib/appium_lib_core/common/ws/websocket.rbs @@ -0,0 +1,103 @@ +module Appium + module Core + class WebSocket + @endpoint: untyped + + @ws_thread: untyped + + @client: untyped + + attr_reader client: untyped + + attr_reader endpoint: untyped + + # A websocket client based on Faye::WebSocket::Client . + # Uses eventmachine to wait response from the peer. The eventmachine works on a thread. The thread will exit + # with close method. + # + # @param [String] url URL to establish web socket connection. If the URL has no port, the client use: + # +ws+: 80, +wss+: 443 ports. + # @param [Array] protocols An array of strings representing acceptable subprotocols for use over the socket. + # The driver will negotiate one of these to use via the Sec-WebSocket-Protocol header + # if supported by the other peer. Default is nil. + # The protocols is equal to https://github.com/faye/faye-websocket-ruby/ 's one for client. + # @param [Hash] options Initialize options for Faye client. Read https://github.com/faye/faye-websocket-ruby#initialization-options + # for more details. Default is +{}+. + # + # @example + # ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat") + # ws.client #=> # # An instance of Faye::WebSocket::Client + # ws.message 'some message' #=> nil. Send a message to the peer. + # ws.close #=> Kill the thread which run a eventmachine. + # + def initialize: (url: untyped, ?protocols: untyped?, ?options: ::Hash[untyped, untyped]) -> void + + # + # Sends a ping frame with an optional message and fires the callback when a matching pong is received. + # + # @param [String] message A message to send ping. + # @param [Block] callback + # + # @example + # ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat") + # ws.ping 'message' + # + def ping: (untyped message) { (?) -> untyped } -> untyped + + # Accepts either a String or an Array of byte-sized integers and sends a text or binary message over the connection + # to the other peer; binary data must be encoded as an Array. + # + # @param [String|Array] message A message to send a text or binary message over the connection + # + # @example + # ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat") + # ws.send 'happy testing' + # + def send: (untyped message) -> untyped + + # Closes the connection, sending the given status code and reason text, both of which are optional. + # + # @param [Integer] code A status code to send to the peer with close signal. Default is nil. + # @param [String] reason A reason to send to the peer with close signal. Default is 'close from ruby_lib_core'. + # + # @example + # ws = WebSocket.new(url: "ws://#{host}:#{port}/ws/session/#{@session_id}/appium/device/logcat") + # ws.close reason: 'a something special reason' + # + def close: (?code: untyped?, ?reason: ::String) -> untyped + + # + # Fires when the socket connection is established. Event has no attributes. + # + # Default is just put a debug message. + # + def handle_open: () -> untyped + + # + # Fires when the socket receives a message. The message gas one +data+ attribute and this method can handle the data. + # The data is either a String (for text frames) or an Array of byte-sized integers (for binary frames). + # + # Default is just put a debug message and puts the result on standard out. + # In general, users should override this handler to handle messages from the peer. + # + def handle_message_data: (untyped data) -> untyped + + # + # Fires when there is a protocol error due to bad data sent by the other peer. + # This event is purely informational, you do not need to implement error recovery. + # + # Default is just put a error message. + # + def handle_error: () -> untyped + + # + # Fires when either the client or the server closes the connection. The method gets +code+ and +reason+ attributes. + # They expose the status code and message sent by the peer that closed the connection. + # + # Default is just put a error message. + # The methods also clear +client+ instance and stop the eventmachine which is called in initialising this class. + # + def handle_close: (untyped code, untyped reason) -> untyped + end + end +end diff --git a/sig/lib/appium_lib_core/driver.rbs b/sig/lib/appium_lib_core/driver.rbs index 803816bb..7557396b 100644 --- a/sig/lib/appium_lib_core/driver.rbs +++ b/sig/lib/appium_lib_core/driver.rbs @@ -109,7 +109,7 @@ module Appium attr_reader enable_idempotency_header: bool - attr_reader device: Symbol + attr_reader device: Symbol | String attr_reader automation_name: Symbol @@ -164,7 +164,7 @@ module Appium private - def convert_to_symbol: (untyped? value) -> Symbol + def convert_to_symbol: (untyped? value) -> Symbol? def extend_for: (device: Symbol | String, automation_name: Symbol) -> self @@ -183,10 +183,10 @@ module Appium def set_app_path: () -> String? def set_appium_lib_specific_values: ( - Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? appium_lib_opts - ) -> self + Hash[Symbol, String] appium_lib_opts + ) -> bool - def set_appium_device: () -> String + def set_appium_device: () -> Symbol def set_automation_name: () -> Symbol? diff --git a/sig/lib/appium_lib_core/element.rbs b/sig/lib/appium_lib_core/element.rbs new file mode 100644 index 00000000..42c1f37e --- /dev/null +++ b/sig/lib/appium_lib_core/element.rbs @@ -0,0 +1,24 @@ +module Appium + module Core + class Element < ::Selenium::WebDriver::Element + include ::Appium::Core::Base::TakesScreenshot + + attr_reader id: untyped + + def method_missing: (untyped method_name, *untyped args) { (?) -> untyped } -> (nil | untyped) + + def respond_to_missing?: (*untyped) -> true + + # Alias for type + alias type send_keys + + def location_rel: (untyped driver) -> untyped + + def screenshot: () -> untyped + + def screenshot_as: (untyped format) -> untyped + + def save_screenshot: (untyped png_path) -> untyped + end + end +end diff --git a/sig/lib/appium_lib_core/ios/clipboard.rbs b/sig/lib/appium_lib_core/ios/clipboard.rbs new file mode 100644 index 00000000..6e78e587 --- /dev/null +++ b/sig/lib/appium_lib_core/ios/clipboard.rbs @@ -0,0 +1,17 @@ +module Appium + module Core + module Ios + module Device + module Clipboard + include _Bridge + + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + + def self.touch_id: -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/ios/device.rbs b/sig/lib/appium_lib_core/ios/device.rbs new file mode 100644 index 00000000..b3751845 --- /dev/null +++ b/sig/lib/appium_lib_core/ios/device.rbs @@ -0,0 +1,12 @@ +module Appium + module Core + module Ios + module Device + include _Bridge + extend Forwardable + + def self.toggle_touch_id_enrollment: -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/ios/xcuitest/bridge.rbs b/sig/lib/appium_lib_core/ios/xcuitest/bridge.rbs new file mode 100644 index 00000000..b80cd9f8 --- /dev/null +++ b/sig/lib/appium_lib_core/ios/xcuitest/bridge.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Ios + module Xcuitest + module Bridge + def self.for: (untyped target) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/ios/xcuitest/device.rbs b/sig/lib/appium_lib_core/ios/xcuitest/device.rbs new file mode 100644 index 00000000..268e8d1d --- /dev/null +++ b/sig/lib/appium_lib_core/ios/xcuitest/device.rbs @@ -0,0 +1,14 @@ +module Appium + module Core + module Ios + module Xcuitest + module Device + extend Forwardable + include _Bridge + + def self.extended: (untyped _mod) -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/ios/xcuitest/device/performance.rbs b/sig/lib/appium_lib_core/ios/xcuitest/device/performance.rbs new file mode 100644 index 00000000..067639ba --- /dev/null +++ b/sig/lib/appium_lib_core/ios/xcuitest/device/performance.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Ios + module Xcuitest + module Device + module Performance + def self.add_methods: () -> untyped + end + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/ios/xcuitest/device/screen.rbs b/sig/lib/appium_lib_core/ios/xcuitest/device/screen.rbs new file mode 100644 index 00000000..f79ee925 --- /dev/null +++ b/sig/lib/appium_lib_core/ios/xcuitest/device/screen.rbs @@ -0,0 +1,15 @@ +module Appium + module Core + module Ios + module Xcuitest + module Device + module Screen + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/mac2/bridge.rbs b/sig/lib/appium_lib_core/mac2/bridge.rbs new file mode 100644 index 00000000..6d0ba915 --- /dev/null +++ b/sig/lib/appium_lib_core/mac2/bridge.rbs @@ -0,0 +1,9 @@ +module Appium + module Core + module Mac2 + module Bridge + def self.for: (untyped target) -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/mac2/device.rbs b/sig/lib/appium_lib_core/mac2/device.rbs new file mode 100644 index 00000000..176a7391 --- /dev/null +++ b/sig/lib/appium_lib_core/mac2/device.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Mac2 + module Device + extend Forwardable + + def self.extended: (untyped _mod) -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/mac2/device/screen.rbs b/sig/lib/appium_lib_core/mac2/device/screen.rbs new file mode 100644 index 00000000..f94bf1f6 --- /dev/null +++ b/sig/lib/appium_lib_core/mac2/device/screen.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Mac2 + module Device + module Screen + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end +end diff --git a/sig/lib/appium_lib_core/support/event_firing_bridge.rbs b/sig/lib/appium_lib_core/support/event_firing_bridge.rbs new file mode 100644 index 00000000..9933da19 --- /dev/null +++ b/sig/lib/appium_lib_core/support/event_firing_bridge.rbs @@ -0,0 +1,21 @@ +module Appium + module Support + class EventFiringBridge < ::Selenium::WebDriver::Support::EventFiringBridge + @appium_options: untyped + + @driver: untyped + + def initialize: (untyped delegate, untyped listener, **untyped opts) -> void + + def find_element_by: (untyped how, untyped what, ?untyped? parent) -> untyped + + def find_elements_by: (untyped how, untyped what, ?untyped? parent) -> untyped + + private + + def create_element: (untyped ref) -> untyped + + def driver: () -> untyped + end + end +end diff --git a/sig/lib/appium_lib_core/windows/bridge.rbs b/sig/lib/appium_lib_core/windows/bridge.rbs new file mode 100644 index 00000000..1ad2d0ba --- /dev/null +++ b/sig/lib/appium_lib_core/windows/bridge.rbs @@ -0,0 +1,9 @@ +module Appium + module Core + module Windows + module Bridge + def self.for: (untyped target) -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/windows/device.rbs b/sig/lib/appium_lib_core/windows/device.rbs new file mode 100644 index 00000000..b3150fc0 --- /dev/null +++ b/sig/lib/appium_lib_core/windows/device.rbs @@ -0,0 +1,11 @@ +module Appium + module Core + module Windows + module Device + extend Forwardable + + def self.extended: (untyped _mod) -> untyped + end + end + end +end diff --git a/sig/lib/appium_lib_core/windows/device/screen.rbs b/sig/lib/appium_lib_core/windows/device/screen.rbs new file mode 100644 index 00000000..a7069350 --- /dev/null +++ b/sig/lib/appium_lib_core/windows/device/screen.rbs @@ -0,0 +1,13 @@ +module Appium + module Core + module Windows + module Device + module Screen + def execute: (Symbol command, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> untyped + + def self.add_methods: () -> untyped + end + end + end + end +end