Skip to content

Commit e499142

Browse files
committed
Fix review issues
1 parent 746acbb commit e499142

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

src/test/java/automationpractice/forms/ChallengingDomForm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class ChallengingDomForm extends Form {
99
public static final String LOCATOR_CHALLENGING_DOM_FORM = "//h3[contains(text(),'Challenging DOM')]";
1010

1111
public ChallengingDomForm() {
12-
super(By.xpath(LOCATOR_CHALLENGING_DOM_FORM), "Header of Challenging Dom");
12+
super(By.xpath(LOCATOR_CHALLENGING_DOM_FORM), "Challenging Dom");
1313
}
1414

1515
public String getHeaderText() {

src/test/java/tests/integration/LocatorTests.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ public void testAboveLocatorWithDifferentAboveParametersType() {
6868
ILabel cellInRow5Column5 = challengingDomForm.getCell(5, 5);
6969
ILabel cellInRow4Column5 = challengingDomForm.getCell(4, 5);
7070

71-
ILabel actualCellRaw3Column5GotWithByXpath =
71+
ILabel actualCellRaw4Column5GotWithByXpath =
7272
elementFactory.getLabel(with(labelLocatorCell).above(cellInRow5Column5.getLocator()),
7373
cellInRow5Column5.getName());
7474

75-
ILabel actualCellRaw3Column5GotWithWebElement =
75+
ILabel actualCellRaw4Column5GotWithWebElement =
7676
elementFactory.getLabel(with(labelLocatorCell).above(cellInRow5Column5.getElement()),
7777
cellInRow4Column5.getName());
7878

79-
ILabel actualCellRaw3Column5GotWithAqualityElement =
79+
ILabel actualCellRaw4Column5GotWithAqualityElement =
8080
elementFactory.getLabel(with(labelLocatorCell).above(cellInRow5Column5),
8181
cellInRow4Column5.getName());
8282

@@ -86,9 +86,9 @@ public void testAboveLocatorWithDifferentAboveParametersType() {
8686
.above(cellInRow5Column5.getLocator()));
8787

8888
checkDifferentTypesWithSoftAssert(
89-
actualCellRaw3Column5GotWithAqualityElement.getText(),
90-
actualCellRaw3Column5GotWithWebElement.getText(),
91-
actualCellRaw3Column5GotWithByXpath.getText(),
89+
actualCellRaw4Column5GotWithAqualityElement.getText(),
90+
actualCellRaw4Column5GotWithWebElement.getText(),
91+
actualCellRaw4Column5GotWithByXpath.getText(),
9292
actualWebElementCellRaw3Column5GotBySeleniumRelative.getText(),
9393
cellInRow4Column5.getText());
9494
}
@@ -193,7 +193,6 @@ public void testAboveBelowLeftRightWithDifferentParametersType() {
193193

194194
ILabel actualCellRaw5Column5GotWithAqualityElement =
195195
elementFactory.getLabel(with(labelLocatorCell)
196-
.above(cellInRow6Column5)
197196
.below(cellInRow3Column5)
198197
.toRightOf(cellInRow5Column3)
199198
.toLeftOf(cellInRow5Column7)
@@ -202,7 +201,6 @@ public void testAboveBelowLeftRightWithDifferentParametersType() {
202201

203202
ILabel actualCellRaw5Column5GotWithWebElement =
204203
elementFactory.getLabel(with(labelLocatorCell)
205-
.above(cellInRow6Column5.getElement())
206204
.below(cellInRow3Column5.getElement())
207205
.toRightOf(cellInRow5Column3.getElement())
208206
.toLeftOf(cellInRow5Column7.getElement())
@@ -211,7 +209,6 @@ public void testAboveBelowLeftRightWithDifferentParametersType() {
211209

212210
ILabel actualCellRaw5Column5GotWithXpath =
213211
elementFactory.getLabel(with(labelLocatorCell)
214-
.above(cellInRow6Column5.getLocator())
215212
.below(cellInRow3Column5.getLocator())
216213
.toRightOf(cellInRow5Column3.getLocator())
217214
.toLeftOf(cellInRow5Column7.getLocator())
@@ -220,7 +217,6 @@ public void testAboveBelowLeftRightWithDifferentParametersType() {
220217

221218
WebElement actualWebElementCellRaw5Column5GotBySeleniumRelative =
222219
getBrowser().getDriver().findElement(RelativeLocator.with(labelLocatorCell)
223-
.above(cellInRow6Column5.getLocator())
224220
.below(cellInRow3Column5.getLocator())
225221
.toRightOf(cellInRow5Column3.getLocator())
226222
.toLeftOf(cellInRow5Column7.getLocator())

0 commit comments

Comments
 (0)