feat: Allow extension capability keys to contain dot characters by alexanderkaiser · Pull Request #2271 · appium/java-client

Change list

Extend the ACCEPTED_W3C_PATTERNS from ^[\\w-]+:.*$ to ^[\\w-\\.]+:.*$

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • 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

I'm running an Appium-based test suite in a device cloud. This device cloud has some vendor specific capabilities and I have the option to provide these either with the prefix digital.ai or without any prefix.

I used to just use the second option and the following capability statement was no big deal:

{
  "accessKey" : "eyJ...k",
  "appiumVersion" : "2.11.3",
  "app" : "cloud:my-App-Name",
  ...
}

But I have the problem that the second option does not work anymore since a few weeks. The actual capabilities look like this

{
  "appium:accessKey" : "eyJ...k",
  "appium:appiumVersion" : "2.11.3",
  "app" : "cloud:my-App-Name",
  ...
}

And when I switch to the first option by using the vendor-specific key digital.ai I get this:

{
  "appium:digital.ai:accessKey" : "eyJ...k",
  "appium:digital.ai:appiumVersion" : "2.11.3",
  "app" : "cloud:my-App-Name",
  ...
}

leading to the point, that the device cloud cannot find the accessKey for auth.

A . DOT is not allowed, but a - DASH is. I could not find any restrictions in the spec for this behavior.