Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor #434

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/appium_lib_core/common/base/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
12 changes: 12 additions & 0 deletions lib/appium_lib_core/common/base/capabilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down