fix: Avoid using getSession call for capability values retrieval by mykola-mokhnach · Pull Request #1216 · appium/java-client

Change list

W3C protocol does not contain getSession API in its spec, which means all calls to HasSessionDetails interface methods will end up with no such method error. As a result, I have replaced all the "static" calls with simple capabilities extraction and the "dynamic" call uses the fact that none of native mobile drivers support javascript execution, - this only works in browser context.

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

See https://github.com/appium/appium/issues/13124#issuecomment-524850823