appium / appium/java-client

bug: appium.io is changing my capability names

Open
#1,881 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Is there an existing issue for this?
  • I have searched the existing issues
Current Behavior

I am running WinAppDriver with appium.io in Java/Eclipse on Windows.

The current behavior is that appium.io is prefixing my "app" and "appId" capabilities with "appium:" (i.e., "appium:app", "appium:appId") while WinAppDriver is expecting just "app" and "appId" and is therefore throwing an error that it is missing capability "appId" (since it is being passed "appium:appId"). I have tried several versions of appium.io in the pom.

Expected Behavior

either appium.io not prefix "appium" (or provide an option), or WinAppDriver recognize capabilities starting with "appium".

Minimal Reproducible Example

(while WinAppDriver is running):

	DesiredCapabilities dcaps = new DesiredCapabilities();
	dcaps.setCapability("automationName", "Windows");
	dcaps.setCapability("appId", "{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\\notepad.exe}");
	dcaps.setCapability("app", "C:\\Windows\\System32\\notepad.exe");
	dcaps.setCapability("appId", "C:\\Windows\\System32\\notepad.exe");
	dcaps.setCapability("platformName", "Windows");
	dcaps.setCapability("deviceName", "Windows PC");
	WindowsDriver app = new WindowsDriver(new URL("http://127.0.0.1:4723/"), dcaps);
Environment
  • Operating system: Windows 10
  • If running Appium Desktop, its version: Not using Appium, just the java client part for WinAppDriver
  • Appium driver(s) and their version(s): I have tried several versions of appium.io. Current is 5.0.0-BETA6 but I have tried many
  • Platform and version under test: Windows 10
Link to Appium Logs

see below

Futher Information

Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: Missing command parameter: appId
Host info: host: 'XXXXXXXXXX' ,<-redacted
Build info: version: '4.5.0', revision: 'fe167b119a'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144'
Driver info: io.appium.java_client.windows.WindowsDriver
Command: [null, newSession {capabilities=[{appium:app=C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe, appium:automationName=Windows, appium:deviceName=Windows PC, platformName=WINDOWS}], desiredCapabilities=Capabilities {app: C:\Program Files (x86)\Wind..., automationName: Windows, deviceName: Windows PC, platformName: WINDOWS}}]
Capabilities {}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:126)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:146)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:180)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:547)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:224)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:157)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:79)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:87)
at io.appium.java_client.windows.WindowsDriver.(WindowsDriver.java:48)
at xxxxx.xxxxx.enterLoginInfo(xxxxx.java:69)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the provided Java DesiredCapabilities example with WindowsDriver and WinAppDriver, then trace how the Java client builds the W3C new-session capabilities. Done means the documented app and appId capabilities are accepted by WinAppDriver without breaking standard capability handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.