11package io .appium .java_client .android ;
22
3- import static java .time .Duration .ofSeconds ;
43import static org .junit .Assert .assertEquals ;
54import static org .junit .Assert .assertNotNull ;
65
@@ -24,7 +23,7 @@ public void afterMethod() {
2423
2524 @ Test
2625 public void testLandscapeRightRotation () {
27- new WebDriverWait (driver , ofSeconds ( 20 ) ).until (ExpectedConditions
26+ new WebDriverWait (driver , 20 ).until (ExpectedConditions
2827 .elementToBeClickable (driver .findElementById ("android:id/content" )
2928 .findElement (MobileBy .AccessibilityId ("Graphics" ))));
3029 DeviceRotation landscapeRightRotation = new DeviceRotation (0 , 0 , 90 );
@@ -34,7 +33,7 @@ public void testLandscapeRightRotation() {
3433
3534 @ Test
3635 public void testLandscapeLeftRotation () {
37- new WebDriverWait (driver , ofSeconds ( 20 ) ).until (ExpectedConditions
36+ new WebDriverWait (driver , 20 ).until (ExpectedConditions
3837 .elementToBeClickable (driver .findElementById ("android:id/content" )
3938 .findElement (MobileBy .AccessibilityId ("Graphics" ))));
4039 DeviceRotation landscapeLeftRotation = new DeviceRotation (0 , 0 , 270 );
@@ -44,7 +43,7 @@ public void testLandscapeLeftRotation() {
4443
4544 @ Test
4645 public void testPortraitUpsideDown () {
47- new WebDriverWait (driver , ofSeconds ( 20 ) ).until (ExpectedConditions
46+ new WebDriverWait (driver , 20 ).until (ExpectedConditions
4847 .elementToBeClickable (driver .findElementById ("android:id/content" )
4948 .findElement (MobileBy .AccessibilityId ("Graphics" ))));
5049 DeviceRotation landscapeRightRotation = new DeviceRotation (0 , 0 , 180 );
@@ -57,7 +56,7 @@ public void testPortraitUpsideDown() {
5756 */
5857 @ Ignore
5958 public void testToastMSGIsDisplayed () {
60- final WebDriverWait wait = new WebDriverWait (driver , ofSeconds ( 30 ) );
59+ final WebDriverWait wait = new WebDriverWait (driver , 30 );
6160 Activity activity = new Activity ("io.appium.android.apis" , ".view.PopupMenu1" );
6261 driver .startActivity (activity );
6362
0 commit comments