Module: Appium::Core::Commands::W3C

Defined in:
lib/appium_lib_core/common/command/w3c.rb

Constant Summary collapse

COMMANDS =
::Appium::Core::Commands::COMMANDS.merge(::Appium::Core::Base::Commands::W3C).merge(
  {
    # ::Appium::Core::Base::Commands::OSS has the following commands and Appium also use them.
    # Delegated to ::Appium::Core::Base::Commands::OSS commands
    status:                    [:get, 'status'], # https://w3c.github.io/webdriver/#dfn-status
    is_element_displayed:      [:get, 'session/:session_id/element/:id/displayed'], # hint: https://w3c.github.io/webdriver/#element-displayedness

    get_timeouts:              [:get, 'session/:session_id/timeouts'], # https://w3c.github.io/webdriver/#get-timeouts

    # Add OSS commands to W3C commands. We can remove them if we would like to remove them from W3C module.
    ### Session capability
    get_capabilities:          [:get, 'session/:session_id'],

    ### rotatable
    get_screen_orientation:    [:get, 'session/:session_id/orientation'],
    set_screen_orientation:    [:post, 'session/:session_id/orientation'],

    get_location:              [:get, 'session/:session_id/location'],
    set_location:              [:post, 'session/:session_id/location'],

    ### For IME
    ime_get_available_engines: [:get,  'session/:session_id/ime/available_engines'],
    ime_get_active_engine:     [:get,  'session/:session_id/ime/active_engine'],
    ime_is_activated:          [:get,  'session/:session_id/ime/activated'],
    ime_deactivate:            [:post, 'session/:session_id/ime/deactivate'],
    ime_activate_engine:       [:post, 'session/:session_id/ime/activate'],

    send_keys_to_active_element: [:post, 'session/:session_id/keys'],

    ### Logs
    get_available_log_types:   [:get, 'session/:session_id/log/types'],
    get_log:                   [:post, 'session/:session_id/log']
  }
).freeze