File tree Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Expand file tree Collapse file tree 2 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 8
8
<artifactId >seleniumWebdriver</artifactId >
9
9
<version >1.0-SNAPSHOT</version >
10
10
11
+ <build >
12
+ <plugins >
13
+ <!-- Compiler plug-in -->
14
+ <!-- Below plug-in is used to execute tests -->
15
+ <plugin >
16
+ <groupId >org.apache.maven.plugins</groupId >
17
+ <artifactId >maven-surefire-plugin</artifactId >
18
+ <version >2.18.1</version >
19
+ <configuration >
20
+ <suiteXmlFiles >
21
+ <!-- TestNG suite XML files -->
22
+ <suiteXmlFile >${tests} </suiteXmlFile >
23
+ </suiteXmlFiles >
24
+ </configuration >
25
+ </plugin >
26
+ </plugins >
27
+ </build >
28
+
11
29
<dependencies >
12
30
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
13
31
<dependency >
27
45
<dependency >
28
46
<groupId >org.seleniumhq.selenium</groupId >
29
47
<artifactId >selenium-java</artifactId >
30
- <version >3.3.1 </version >
48
+ <version >3.5.3 </version >
31
49
</dependency >
32
50
33
51
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
51
69
<version >2.1.5</version >
52
70
<scope >test</scope >
53
71
</dependency >
72
+ <dependency >
73
+ <groupId >org.seleniumhq.selenium</groupId >
74
+ <artifactId >selenium-support</artifactId >
75
+ <version >3.5.3</version >
76
+ <scope >test</scope >
77
+ </dependency >
54
78
55
79
</dependencies >
56
80
Original file line number Diff line number Diff line change @@ -112,24 +112,17 @@ public void updateTickets() throws InterruptedException {
112
112
isTrPresent = false ;
113
113
}
114
114
}
115
- waitOnElement (10 ,By .id ("header-details-user-fullname" ));
116
- driver .findElement (By .id ("header-details-user-fullname" )).click ();
117
- waitOnElement (10 ,By .id ("log_out" ));
118
- driver .findElement (By .id ("log_out" )).click ();
119
- waitOnElement (10 ,By .xpath ("//li[@id='user-options']//a[text()='Log In']" ));
120
- Assert .assertTrue (waitOnElement (10 ,By .xpath ("//li[@id='user-options']//a[text()='Log In']" )),"User in not looged out successfully" );
121
- System .out .println ("Logged Out Successfully" );
122
115
}
123
116
124
117
@ Test (priority = 2 )
125
118
public void logout (){
126
- /* waitOnElement(10,By.id("header-details-user-fullname"));
119
+ waitOnElement (10 ,By .id ("header-details-user-fullname" ));
127
120
driver .findElement (By .id ("header-details-user-fullname" )).click ();
128
121
waitOnElement (10 ,By .id ("log_out" ));
129
122
driver .findElement (By .id ("log_out" )).click ();
130
123
waitOnElement (10 ,By .xpath ("//li[@id='user-options']//a[text()='Log In']" ));
131
124
Assert .assertTrue (waitOnElement (10 ,By .xpath ("//li[@id='user-options']//a[text()='Log In']" )),"User in not looged out successfully" );
132
- System.out.println("Logged Out Successfully");*/
125
+ System .out .println ("Logged Out Successfully" );
133
126
}
134
127
135
128
public boolean apply (WebElement element ) {
You can’t perform that action at this time.
0 commit comments