Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
POM_page_factory_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
Shaphen Pangburn
POM_page_factory_exercise
Commits
479b3920
Commit
479b3920
authored
Apr 13, 2021
by
Shaphen Pangburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor xpaths to look cleaner
parent
61f0fef1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
AccountSettingsPage.java
...um/pompagefactory/practice/pages/AccountSettingsPage.java
+4
-4
No files found.
src/main/java/com/nisum/pompagefactory/practice/pages/AccountSettingsPage.java
View file @
479b3920
...
@@ -15,11 +15,11 @@ public class AccountSettingsPage {
...
@@ -15,11 +15,11 @@ public class AccountSettingsPage {
WebDriver
driver
;
WebDriver
driver
;
@FindBy
(
xpath
=
"//*[@id='input-firstName']"
)
@FindBy
(
xpath
=
"//*[@id='input-firstName']"
)
public
WebElement
accountFirstName
;
public
WebElement
accountFirstName
;
@FindBy
(
xpath
=
"//*[@id=
\"input-lastName\"
]"
)
@FindBy
(
xpath
=
"//*[@id=
'input-lastName'
]"
)
public
WebElement
accountLastName
;
public
WebElement
accountLastName
;
@FindBy
(
xpath
=
"//*[@id=
\"emailIdaccount\"
]"
)
@FindBy
(
xpath
=
"//*[@id=
'emailIdaccount'
]"
)
public
WebElement
accountEmail
;
public
WebElement
accountEmail
;
@FindBy
(
xpath
=
"//*[@id=
\"phoneNumber\"
]"
)
@FindBy
(
xpath
=
"//*[@id=
'phoneNumber'
]"
)
public
WebElement
accountPhoneNumber
;
public
WebElement
accountPhoneNumber
;
public
AccountSettingsPage
(
WebDriver
driver
)
{
public
AccountSettingsPage
(
WebDriver
driver
)
{
...
@@ -29,7 +29,7 @@ public class AccountSettingsPage {
...
@@ -29,7 +29,7 @@ public class AccountSettingsPage {
}
}
public
WebElement
getAccountDropdown
()
{
return
driver
.
findElement
(
By
.
linkText
(
"Account"
));
}
public
WebElement
getAccountDropdown
()
{
return
driver
.
findElement
(
By
.
linkText
(
"Account"
));
}
public
WebElement
getAccountSettingsButton
()
{
return
driver
.
findElement
(
By
.
xpath
(
"//*[@id=
\"menu\"
]/div[1]/ul/li[4]/a"
));
}
public
WebElement
getAccountSettingsButton
()
{
return
driver
.
findElement
(
By
.
xpath
(
"//*[@id=
'menu'
]/div[1]/ul/li[4]/a"
));
}
public
void
goToAccountSettings
()
{
public
void
goToAccountSettings
()
{
WebDriverWait
wait
=
new
WebDriverWait
(
driver
,
5
);
WebDriverWait
wait
=
new
WebDriverWait
(
driver
,
5
);
...
...
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