Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
selenium-pom-pf-exercise
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
Shanelle Valencia
selenium-pom-pf-exercise
Commits
2bc63cd2
Commit
2bc63cd2
authored
Apr 14, 2021
by
Shanelle Valencia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update test name folder
parent
393c3250
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
86 deletions
+0
-86
TestPom.java
src/test/java/com/nisum/TestPom.java
+0
-86
No files found.
src/test/java/com/nisum/TestPom.java
deleted
100644 → 0
View file @
393c3250
package
com
.
nisum
;
import
org.junit.After
;
import
org.junit.Assert
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
import
org.junit.jupiter.api.*
;
import
org.openqa.selenium.By
;
import
org.openqa.selenium.WebDriver
;
import
org.openqa.selenium.chrome.ChromeDriver
;
import
org.openqa.selenium.support.ui.ExpectedConditions
;
import
org.openqa.selenium.support.ui.WebDriverWait
;
import
java.util.concurrent.TimeUnit
;
public
class
TestPom
{
private
static
WebDriver
driver
;
private
static
WebDriverWait
wdw
;
private
String
email
=
"vkrijegccvsknuvnpv@miucce.com"
;
private
String
password
=
"12345678"
;
private
String
firstName
=
"Nisum"
;
private
String
lastName
=
"TestAcct"
;
private
String
safewayUrl
=
"https://www.safeway.com/"
;
@BeforeAll
public
static
void
initialSetup
()
{
System
.
setProperty
(
"webdriver.chrome.driver"
,
"/Users/svalencia/Desktop/webdriver/chromedriver"
);
driver
=
new
ChromeDriver
();
driver
.
manage
().
timeouts
().
implicitlyWait
(
5
,
TimeUnit
.
SECONDS
);
wdw
=
new
WebDriverWait
(
driver
,
5
);
}
@Test
public
void
navigateSafeway
()
{
HomePage
homePage
=
new
HomePage
(
driver
);
homePage
.
navigateHomePage
(
safewayUrl
);
homePage
.
getSignInLink
();
}
@Test
public
void
testLogIn
()
{
navigateSafeway
();
Login
login
=
new
Login
(
driver
);
login
.
login
(
email
,
password
);
AccountSettingsPF
acc
=
new
AccountSettingsPF
(
driver
);
// acc.navigateAcctDropdown();
// wdw.until(ExpectedConditions.visibilityOf(acc.userGreeting));
// Assert.assertEquals(acc.userGreeting.getText(), "Hi " + firstName);
acc
.
navigateAcctInfo
();
wdw
.
until
(
ExpectedConditions
.
elementToBeClickable
(
acc
.
firstName
));
Assertions
.
assertAll
(
"All information must match"
,
()
->
Assert
.
assertEquals
(
firstName
,
acc
.
firstName
.
getAttribute
(
"value"
)),
()
->
Assert
.
assertEquals
(
lastName
,
acc
.
lastName
.
getAttribute
(
"value"
)),
()
->
Assert
.
assertEquals
(
email
,
acc
.
email
.
getAttribute
(
"value"
))
);
login
.
navigateHome
(
safewayUrl
);
}
@AfterAll
public
static
void
tearDown
()
{
driver
.
quit
();
}
}
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