java-client
java-client copied to clipboard
org.openqa.selenium.InvalidArgumentException: Parameters were incorrect. We wanted {"required":["text"]} and you sent ["id","value"]
Description
I am totally puzzled. I got a new M1 Mac laptop and believe I am using all the identical versions of the required tools as my old laptop, but I am getting org.openqa.selenium.InvalidArgumentException: Parameters were incorrect. We wanted {"required":["text"]} and you sent ["id","value"]. This occurs when I call setValue("xxx") on a text entry field.
Environment
- Java client build version 7.6.0. I have tried different versions of java but currently using 1.8.
- Appium server version v2.0.0-beta.25 (REV 552db40622bb7a82d9c6d67d2d6bcf3694b47e30)
- Desktop OS/version Apple M1, Ventura 13.2.1
- Node.js version 18.9.0
- Mobile platform/version under test: both ios 15.6.1 and android 9
- Device drivers: - [email protected] [installed (NPM)], [email protected] [installed (NPM)]
- Real device or emulator/simulator: Real devices
Details
The error occurs on both Android and iOS. I have tried the most recent version of the appium server. I have tried different versions of the drivers. I have tried different versions of node. I have tried different versions of java. One big mystery is that for a brief time, I did get things to work. That occurred when I downgraded node to be the same as the version on my old laptop. But something changed in my world and things have returned to the error listed above and I am at a loss as to what to do.
Seems like a java client and server compatibility issue. Something happened like this ages ago with the python client. I don't know how this is possible, but the only difference I am seeing is that I am running things on my new M1. Hopefully, I am missing something.
Code To Reproduce Issue [ Good To Have ]
field.setValue("value")
Exception Stacktraces
Here is the application call stack
Link To Appium Logs
No response from the Appium guys which is unusual. I was using version 7.6.0 of the client. There were a couple of reasons I had not upgraded to version 8, but this forced me to undertake that effort and sure enough, this error went away. Version 8 only supports sendKeys rather than setValue. Not sure what the compatibility issue is with an Mac M1 and version 7.6.0 of the java-client.
Simply use sendKeys. They both call the same API endpoint
The setValue one is obsolete and has been created for legacy purposes which are not relevant anymore.
@mykola-mokhnach, facing the same issue when calling replaceElementValue from CanReplaceElementValue interface on Android. Shouldn't it work too?