Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SeleniumTraining
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Qazi Zain
SeleniumTraining
Commits
29fbd8c4
Commit
29fbd8c4
authored
Nov 06, 2024
by
Qazi Zain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second commit assertion added in Existing Code
parent
b2bd1e4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
AllTypeLocators.java
src/test/java/Locaters_Practice/AllTypeLocators.java
+7
-2
No files found.
src/test/java/Locaters_Practice/AllTypeLocators.java
View file @
29fbd8c4
...
...
@@ -6,6 +6,7 @@ import org.openqa.selenium.WebDriver;
import
org.openqa.selenium.firefox.FirefoxDriver
;
import
org.openqa.selenium.support.ui.ExpectedConditions
;
import
org.openqa.selenium.support.ui.WebDriverWait
;
import
org.testng.Assert
;
import
java.time.Duration
;
...
...
@@ -14,7 +15,7 @@ public class AllTypeLocators {
public
static
void
main
(
String
[]
args
)
throws
InterruptedException
{
WebDriver
obj
=
new
FirefoxDriver
();
//addin
ng waiting mechanisim
to avoid to fail due to timeout issue.
//addin
g waiting
to avoid to fail due to timeout issue.
obj
.
manage
().
timeouts
().
implicitlyWait
(
Duration
.
ofSeconds
(
5
));
...
...
@@ -99,5 +100,9 @@ public class AllTypeLocators {
System
.
out
.
println
(
"After login :"
+
dilouge
);
Assert
.
assertEquals
(
obj
.
findElement
(
By
.
xpath
(
"//div[@class='login-container']/h2"
)).
getText
(),
"Hello Qazi"
);
// to test the actual vs expected.
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment