File tree 5 files changed +58
-2
lines changed
5 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 12
12
<dependency >
13
13
<groupId >com.coveros</groupId >
14
14
<artifactId >selenified</artifactId >
15
- <version >3.1 .0</version >
15
+ <version >3.2 .0</version >
16
16
</dependency >
17
17
</dependencies >
18
18
Original file line number Diff line number Diff line change
1
+ import com .coveros .selenified .Locator ;
2
+ import com .coveros .selenified .application .App ;
3
+ import com .coveros .selenified .element .Element ;
4
+
5
+ public class CoverosHomePage {
6
+
7
+ private final Element searchBox ;
8
+
9
+ public CoverosHomePage (App app ) {
10
+ searchBox = app .newElement (Locator .ID , "s" );
11
+ }
12
+
13
+ public void searchFor (String searchFor ) {
14
+ searchBox .type (searchFor );
15
+ searchBox .submit ();
16
+ }
17
+ }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class CoverosIT extends Selenified {
11
11
@ BeforeClass (alwaysRun = true )
12
12
public void beforeClass (ITestContext test ) {
13
13
// set the base URL for the tests here
14
- setTestSite (this , test , "https://www.coveros.com" );
14
+ setAppURL (this , test , "https://www.coveros.com" );
15
15
}
16
16
17
17
@ Test
Original file line number Diff line number Diff line change
1
+ package sample ;
2
+
3
+ import com .coveros .selenified .Locator ;
4
+ import com .coveros .selenified .application .App ;
5
+ import com .coveros .selenified .element .Element ;
6
+
7
+ public class Header {
8
+
9
+ private final Element mainMenuBar ;
10
+ private final Element selenifiedLink ;
11
+
12
+ public Header (App app ) {
13
+ mainMenuBar = app .newElement (Locator .CSS , "#header div:nth-child(2)" );
14
+ selenifiedLink = app .newElement (Locator .LINKTEXT , "Selenified" );
15
+ }
16
+
17
+ public void navigateToSelenified () {
18
+ mainMenuBar .click ();
19
+ selenifiedLink .click ();
20
+ }
21
+ }
Original file line number Diff line number Diff line change
1
+ package sample ;
2
+
3
+ import com .coveros .selenified .Locator ;
4
+ import com .coveros .selenified .application .App ;
5
+ import com .coveros .selenified .element .Element ;
6
+
7
+ public class SearchPage {
8
+
9
+ private final Element blogHeader ;
10
+
11
+ public SearchPage (App app ) {
12
+ blogHeader = app .newElement (Locator .CLASSNAME , "header-blog" );
13
+ }
14
+
15
+ public void waitForPageToLoad () {
16
+ blogHeader .waitForState ().displayed ();
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments