Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Appium with Java: Selenium 4.11.0 Appium 8.6.0 , Could not start a new session. Response code 400. Message: Missing command parameter: appId

Ouverte
#2,202 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
38/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
java
Domaine
desktop, testing-qa

Piste de recherche

Commencez par la méthode setup de CalculatorTest et comparez les capabilities envoyées par WindowsDriver avec la matrice de compatibilité et l’erreur de WinAppDriver indiquant qu’il manque appId. Reproduisez la requête POST /session, puis vérifiez qu’une session corrigée peut lancer Notepad et exécuter les étapes du test.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Description

I'm trying to run a simple test with java maven project, I already have installed winAppDriver, but I'm getting the following Error on WinAppDriver

`HTTP/1.1 400 Bad Request
Content-Length: 96
Content-Type: application/json

{"status":100,"value":{"error":"invalid argument","message":"Missing command parameter: appId"}}

==========================================
POST /session HTTP/1.1
Accept: /
Content-Length: 352
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: appium/8.6.0 (selenium/4.13.0 (java windows))
X-Idempotency-Key: 4a972c32-fbeb-45f0-9cc2-5163d237b6af

HTTP/1.1 400 Bad Request
Content-Length: 96
Content-Type: application/json`

Environment

  • Java client build version or git revision if you use some snapshot: 4.11.0
  • Appium server version or git revision if you use some snapshot: 8.6.0
  • Desktop OS/version used to run Appium if necessary: Desktop Windows

Details

I use this link https://github.com/appium/java-client?tab=readme-ov-file#compatibility-matrix for the compatibility Issues,
I don't understand the "appId" parameters,

Code To Reproduce Issue [ Good To Have ]

`import io.appium.java_client.windows.WindowsDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import java.net.MalformedURLException;
import java.net.URL;
import java.time.Duration;
// https://github.com/appium/java-client?tab=readme-ov-file#compatibility-matrix
public class CalculatorTest {
private WindowsDriver driver;
@BeforeClass
public void setup() throws MalformedURLException {

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("app", "C:\\Windows\\System32\\notepad.exe");
    capabilities.setCapability("platformName", "Windows");
    capabilities.setCapability("deviceName", "WindowsPC");
    capabilities.setCapability("automationName", "Windows");
    driver = new WindowsDriver(new URL("http://127.0.0.1:4723/"), capabilities);
    driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2));
}

@Test
public void writeTest() {
    // Find the text area element and write "This is a test"
    WebElement editField = driver.findElement(By.id("Edit"));
    editField.sendKeys("This is a test");

    // Save the file
    driver.findElement(By.id("File")).click();
    driver.findElement(By.id("Save As...")).click();

    // Enter the file name
    WebElement fileNameField = driver.findElement(By.id("Edit"));
    fileNameField.sendKeys("testfile.txt");

    // Click the Save button
    driver.findElement(By.id("Save")).click();
}

@AfterClass
public void tearDown() {
    if (driver != null) {
        driver.quit();
    }
}

}
`

Exception Stacktraces

this is the Log Error:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: Missing command parameter: appId Host info: host: 'DESKTOP-4NSBAV2', ip: '192.168.56.1' Build info: version: '4.13.0', revision: 'ba948ece5b*' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.15' Driver info: io.appium.java_client.windows.WindowsDriver Command: [null, newSession {capabilities=[{appium:app=C:\Windows\System32\notepad.exe, appium:automationName=Windows, appium:deviceName=WindowsPC, platformName=windows}], desiredCapabilities=Capabilities {app: C:\Windows\System32\notepad..., automationName: Windows, deviceName: WindowsPC, platformName: windows}}] Capabilities {app: C:\Windows\System32\notepad..., automationName: Windows, deviceName: WindowsPC, platformName: windows}

Langage dominant
Java
Étoiles
1.3k
Forks
755
Merge moyen
5 j 14 h
PR mergées (30 j)
8

Préparer son environnement

  • Aucun Dockerfile ni fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de appium/java-client

Toutes les issues de appium/java-client

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.