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
bca8f89b
Commit
bca8f89b
authored
Apr 15, 2021
by
Shanelle Valencia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test commit
parent
964cc128
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
0 deletions
+95
-0
vcs.xml
.idea/vcs.xml
+6
-0
TestPomAndPF.java
src/test/java/com/nisum/TestPomAndPF.java
+89
-0
HomePage.class
target/classes/com/nisum/HomePage.class
+0
-0
TestPomAndPF.class
target/test-classes/com/nisum/TestPomAndPF.class
+0
-0
No files found.
.idea/vcs.xml
0 → 100644
View file @
bca8f89b
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
src/test/java/com/nisum/TestPomAndPF.java
0 → 100644
View file @
bca8f89b
package
com
.
nisum
;
import
org.junit.*
;
import
org.junit.jupiter.api.*
;
import
org.junit.jupiter.api.Test
;
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
org.openqa.selenium.WebDriver
;
import
java.util.concurrent.TimeUnit
;
public
class
TestPomAndPF
{
private
static
WebDriver
driver
;
private
static
WebDriverWait
wdw
;
private
static
HomePage
homePage
;
private
static
Login
login
;
private
static
AccountSettingsPF
acc
;
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
);
homePage
=
new
HomePage
(
driver
);
login
=
new
Login
(
driver
);
acc
=
new
AccountSettingsPF
(
driver
);
}
@Test
public
void
navigateSafeway
()
{
homePage
.
navigateHomePage
(
safewayUrl
);
homePage
.
getSignInLink
();
}
@Test
public
void
testLogIn
()
{
navigateSafeway
();
login
.
login
(
email
,
password
);
// 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
();
}
}
target/classes/com/nisum/HomePage.class
View file @
bca8f89b
No preview for this file type
target/test-classes/com/nisum/TestPomAndPF.class
0 → 100644
View file @
bca8f89b
File added
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