1
1
package sdkexamples .Tests ;
2
2
3
- import functional .tests .core .enums .PlatformType ;
4
- import functional .tests .core .mobile .element .UIRectangle ;
5
3
import functional .tests .core .mobile .find .Wait ;
6
- import org .openqa .selenium .By ;
7
4
import org .springframework .util .Assert ;
8
5
import org .testng .annotations .DataProvider ;
9
6
import org .testng .annotations .Test ;
10
7
import sdkexamples .SdkBaseTest ;
11
8
12
- import java .awt .*;
13
-
14
9
public class SdkWebViewTests extends SdkBaseTest {
15
10
16
11
private final String pageWebViewCode = "Basic WebView" ;
@@ -33,18 +28,12 @@ public Object[][] data() {
33
28
@ Test (dataProvider = "example" )
34
29
public void sdkWebViewTest (String example ) throws Exception {
35
30
this .mainPage .navigateTo (example );
36
-
37
- Wait .sleep (10000 );
38
31
if (example == pageWebViewCode ) {
39
- if (this .settings .platform == PlatformType .iOS ) {
40
- UIRectangle doneBtn = new UIRectangle (new Rectangle (17 , 25 , 200 , 200 ), this .context );
41
- doneBtn .tap ();
42
- doneBtn .tap ();
43
- }
44
-
45
- this .wait .waitForVisible (this .locators .byText ("WebView finished loading" ,false ,false ),true );
32
+ Wait .sleep (10000 );
33
+ this .wait .waitForVisible (this .locators .byText ("WebView finished loading of" , false , false ), true );
34
+ } else if (example == pageWebViewHtml ) {
35
+ Assert .notNull (this .find .byText ("First WebView" ));
46
36
}
47
-
48
37
this .log .logScreen (example );
49
38
}
50
39
}
0 commit comments