@@ -174,7 +174,7 @@ UiAutomator2Options options = new UiAutomator2Options()
174174 .setApp(" /home/myapp.apk" );
175175AndroidDriver driver = new AndroidDriver (
176176 // The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
177- new URL (" http://127.0.0.1:4723" ), options
177+ new URI (" http://127.0.0.1:4723" ) . toURL( ), options
178178);
179179try {
180180 WebElement el = driver. findElement(AppiumBy . xpath(" //Button" ));
@@ -193,7 +193,7 @@ XCUITestOptions options = new XCUITestOptions()
193193 .setApp(" /home/myapp.ipa" );
194194IOSDriver driver = new IOSDriver (
195195 // The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
196- new URL (" http://127.0.0.1:4723" ), options
196+ new URI (" http://127.0.0.1:4723" ) . toURL( ), options
197197);
198198try {
199199 WebElement el = driver. findElement(AppiumBy . accessibilityId(" myId" ));
@@ -214,7 +214,7 @@ BaseOptions options = new BaseOptions()
214214 .amend(" mycapability2" , " capvalue2" );
215215AppiumDriver driver = new AppiumDriver (
216216 // The default URL in Appium 1 is http://127.0.0.1:4723/wd/hub
217- new URL (" http://127.0.0.1:4723" ), options
217+ new URI (" http://127.0.0.1:4723" ) . toURL( ), options
218218);
219219try {
220220 WebElement el = driver. findElement(AppiumBy . className(" myClass" ));
0 commit comments