File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
utam-core/src/test/java/utam/core/selenium/appium Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,9 @@ public void testSwitchToWebViewWithMultipleWebViewsAndroid() {
406406 });
407407 when (driver .getWindowHandles ()).thenReturn (windowHandles );
408408 when (driver .getTitle ()).thenReturn ("" ).thenReturn (testWebViewTitle );
409- when (contextSwitcher .getContext ()).thenReturn (contextTracker .currentContext );
409+ when (contextSwitcher .getContext ())
410+ .thenReturn (contextTracker .currentContext )
411+ .thenReturn (testWebViewHandle );
410412 mock .setMobilePlatform (Platform .LINUX );
411413 MobileDriverAdapter adapter = mock .getMobileDriverAdapter ();
412414 assertThat (
@@ -432,10 +434,7 @@ public void testSwitchToWebViewWithNoWebViewsAndroid() {
432434 when (driver .getCapabilities ().getPlatformName ()).thenReturn (Platform .ANDROID );
433435 when (contextSwitcher .getContextHandles ()).thenReturn (contextHandles );
434436 when (driver .getWindowHandles ())
435- .then (
436- (arg ) -> {
437- throw new UnsupportedCommandException ("getWindowHandles {}" );
438- });
437+ .thenThrow (new UnsupportedCommandException ("getWindowHandles {}" ));
439438 when (contextSwitcher .getContext ()).thenReturn (contextTracker .currentContext );
440439 mock .setMobilePlatform (Platform .LINUX );
441440 MobileDriverAdapter adapter = mock .getMobileDriverAdapter ();
You can’t perform that action at this time.
0 commit comments