@@ -174,7 +174,7 @@ UiAutomator2Options options = new UiAutomator2Options()
174
174
.setApp(" /home/myapp.apk" );
175
175
AndroidDriver driver = new AndroidDriver (
176
176
// 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
178
178
);
179
179
try {
180
180
WebElement el = driver. findElement(AppiumBy . xpath(" //Button" ));
@@ -193,7 +193,7 @@ XCUITestOptions options = new XCUITestOptions()
193
193
.setApp(" /home/myapp.ipa" );
194
194
IOSDriver driver = new IOSDriver (
195
195
// 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
197
197
);
198
198
try {
199
199
WebElement el = driver. findElement(AppiumBy . accessibilityId(" myId" ));
@@ -214,7 +214,7 @@ BaseOptions options = new BaseOptions()
214
214
.amend(" mycapability2" , " capvalue2" );
215
215
AppiumDriver driver = new AppiumDriver (
216
216
// 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
218
218
);
219
219
try {
220
220
WebElement el = driver. findElement(AppiumBy . className(" myClass" ));
0 commit comments