As usually, before running mvn test
i executed mvn clean
, but this time a lot of things started downloading, once it finished i ran the code and got this error:
class org.openqa.selenium.Platform$22 cannot be cast to class java.lang.String (org.openqa.selenium.Platform$22 is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap')
I actually didnt change anything, it just stop working (Last time I checked that this worked was 1 week ago)
This is the code that generates the error:
DesiredCapabilitiescap = new DesiredCapabilities();
URL url = new URL("http://0.0.0.0:4723/wd/hub");
cap.setCapability("platformName", "Android");
cap.setCapability("deviceName", "emulator-5554");
cap.setCapability("avd", "Pixel_4_API_30");
cap.setCapability("appPackage", "com.myapp.dev");
cap.setCapability("appActivity", "com.myapp.splash.SplashActivity");
cap.setCapability("appWaitActivity","com.myapp.fulllogin.WelcomeActivity");
cap.setCapability("automationName", "UiAutomator2");
cap.setCapability("noReset", "false");
AppiumDriver driver = new AndroidDriver(url, cap);