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
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- desktop, testing-qa
Hướng nghiên cứu
Bắt đầu với phương thức setup trong CalculatorTest và so sánh các capabilities được WindowsDriver gửi với ma trận tương thích và lỗi của WinAppDriver cho thấy thiếu appId. Tái hiện yêu cầu POST /session, sau đó xác minh rằng một session đã được sửa có thể khởi chạy Notepad và thực thi các bước kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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}
- Ngôn ngữ chính
- Java
- Star
- 1.3k
- Fork
- 752
- Merge trung bình
- 5 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appium/java-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appium/java-client#2426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
appium/java-client#2372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
appium/java-client#2368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
appium/java-client#2341 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
appium/java-client#2323 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của appium/java-client
Issue tương tự
-
and-bugs and-ui gpx-track
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 2 ngày
-
TerminalRow.mSpaceUsed (short) overflows on terminals wider than 1023 columns, crashing setCharĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
termux/termux-app#5340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
OpenAICompatibleToolDescriptorSchemaGenerator drops requiredProperties of nested object parametersĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
apache/rocketmq-dashboard#5110 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
No-Country-simulation/S08-26-equipo04#210 ·
Maintainer thường phản hồi trong vòng 1 ngày