Closed asmayonis1 closed 5 months ago
Not sure this exception has to do anything with this client
eeee.
1 you should move start Appium driver to @beforeMethod
2 this is not an appium bug. ask questions -> https://discuss.appium.io/
3 error tells: you did not provide platformVersion
you can add logs to see it:
public void initializeAndroidDriver(
String platformVersion,
String platformName,
String deviceName,
String automationName) throws MalformedURLException {
System.out.println("initializeAndroidDriver(): platformVersion: '" + platformVersion + "', platformName: '" + platformName + "', deviceName: '" + deviceName + "', automationName: '" + automationName + "'");
@amedvedjev platform provided in XML as
<test name="Test-OnePlus5">
<parameter name="platformVersion" value="13.0"></parameter>
<parameter name="platformName" value="android"></parameter>
<parameter name="deviceName" value="RF8NA0W2YFM"></parameter>
<parameter name="automationName" value="UiAutomator2" />
but I figured the issue is we need to import import org.testng.ITestContext;
Do I have the most recent component updates?
Is the component officially supported by the Appium team?
Is there an existing issue for this?
Current Behavior
@BeforeSuite @Parameters({"platformVersion", "platformName", "deviceName", "automationName"}) public void initializeAndroidDriver( String platformVersion, String platformName, String deviceName, String automationName) throws MalformedURLException { {
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
through exception org.testng.TestNGException: Parameter 'platformVersion' is required by BeforeSuite on method initializeAndroidDriver but has not been marked @Optional or defined in /private/var/folders/b5/936632353fj08k51cf78vm9jcn4crr/T/testng-eclipse-1114858715/testng-customsuite.xml
Expected Behavior
Android parameters should read from XML and run correctly
Minimal Reproducible Example
code has been attached
Environment
appium --version
): v2.3.0node --version
):npm
version (output ofnpm --version
):Link to Appium Logs
No response
Further Information
No response