diff --git a/lib/appium_lib_core/common/base/bridge.rb b/lib/appium_lib_core/common/base/bridge.rb index b6354ec0..b087f0a1 100644 --- a/lib/appium_lib_core/common/base/bridge.rb +++ b/lib/appium_lib_core/common/base/bridge.rb @@ -112,6 +112,9 @@ def create_session(capabilities) @capabilities = json_create(response['capabilities']) end + # TODO: move the adding prefix into ::Appium::Core::Base::Capabilities so that + # so that this bridge class does not change from the selenium client + # # Append +appium:+ prefix for Appium following W3C spec # https://www.w3.org/TR/webdriver/#dfn-validate-capabilities # diff --git a/lib/appium_lib_core/common/base/capabilities.rb b/lib/appium_lib_core/common/base/capabilities.rb index caaf5c74..93bd1170 100644 --- a/lib/appium_lib_core/common/base/capabilities.rb +++ b/lib/appium_lib_core/common/base/capabilities.rb @@ -23,6 +23,18 @@ class Capabilities < ::Selenium::WebDriver::Remote::Capabilities # Appium's capabilities could change by depending on Appium versions. So it does not have # standard options like chrome and firefox etc. So, the implementation should differ from # other browsers. But here should inherit `Options` to follow Selenium. + + def json_create(value) + super + # do adding 'appium:' here + add_appium_prefix(value) + end + + private + + def add_appium_prefix(value) + # do 'add_appium_prefix' for the + end end end end