Skip to content

Commit 3566f60

Browse files
author
jitendra pisal
committed
updated classes
1 parent 5a5bd09 commit 3566f60

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

seleniumWebdriver/pom.xml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@
88
<artifactId>seleniumWebdriver</artifactId>
99
<version>1.0-SNAPSHOT</version>
1010

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+
1129
<dependencies>
1230
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
1331
<dependency>
@@ -27,7 +45,7 @@
2745
<dependency>
2846
<groupId>org.seleniumhq.selenium</groupId>
2947
<artifactId>selenium-java</artifactId>
30-
<version>3.3.1</version>
48+
<version>3.5.3</version>
3149
</dependency>
3250

3351
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
@@ -51,6 +69,12 @@
5169
<version>2.1.5</version>
5270
<scope>test</scope>
5371
</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>
5478

5579
</dependencies>
5680

seleniumWebdriver/src/test/java/basics/UpdateTickets.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,17 @@ public void updateTickets() throws InterruptedException {
112112
isTrPresent = false;
113113
}
114114
}
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");
122115
}
123116

124117
@Test(priority = 2)
125118
public void logout(){
126-
/*waitOnElement(10,By.id("header-details-user-fullname"));
119+
waitOnElement(10,By.id("header-details-user-fullname"));
127120
driver.findElement(By.id("header-details-user-fullname")).click();
128121
waitOnElement(10,By.id("log_out"));
129122
driver.findElement(By.id("log_out")).click();
130123
waitOnElement(10,By.xpath("//li[@id='user-options']//a[text()='Log In']"));
131124
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");
133126
}
134127

135128
public boolean apply(WebElement element) {

0 commit comments

Comments
 (0)