Skip to content

Commit 3fb1c6c

Browse files
committed
[Feature/Add_Relative_Locators] Changing realization relative functions through Aquality element with getElement() to getLocator()
1 parent 2090231 commit 3fb1c6c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/aquality/selenium/locators/RelativeBy.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public RelativeBy(By by) {
1515
}
1616

1717
public RelativeBy above(IElement element) {
18-
by = RelativeLocator.with(by).above(element.getElement());
18+
by = RelativeLocator.with(by).above(element.getLocator());
1919
return new RelativeBy(by);
2020
}
2121

@@ -30,7 +30,7 @@ public RelativeBy above(By by) {
3030
}
3131

3232
public RelativeBy below(IElement element) {
33-
by = RelativeLocator.with(by).below(element.getElement());
33+
by = RelativeLocator.with(by).below(element.getLocator());
3434
return new RelativeBy(by);
3535
}
3636

@@ -45,7 +45,7 @@ public RelativeBy below(By by) {
4545
}
4646

4747
public RelativeBy toLeftOf(IElement element) {
48-
by = RelativeLocator.with(by).toLeftOf(element.getElement());
48+
by = RelativeLocator.with(by).toLeftOf(element.getLocator());
4949
return new RelativeBy(by);
5050
}
5151

@@ -60,7 +60,7 @@ public RelativeBy toLeftOf(By by) {
6060
}
6161

6262
public RelativeBy toRightOf(IElement element) {
63-
by = RelativeLocator.with(by).toRightOf(element.getElement());
63+
by = RelativeLocator.with(by).toRightOf(element.getLocator());
6464
return new RelativeBy(by);
6565
}
6666

@@ -75,7 +75,7 @@ public RelativeBy toRightOf(By by) {
7575
}
7676

7777
public RelativeBy near(IElement element) {
78-
by = RelativeLocator.with(by).near(element.getElement());
78+
by = RelativeLocator.with(by).near(element.getLocator());
7979
return new RelativeBy(by);
8080
}
8181

@@ -90,7 +90,7 @@ public RelativeBy near(By by) {
9090
}
9191

9292
public RelativeBy near(IElement element, int atMostDistanceInPixels) {
93-
by = RelativeLocator.with(by).near(element.getElement(), atMostDistanceInPixels);
93+
by = RelativeLocator.with(by).near(element.getLocator(), atMostDistanceInPixels);
9494
return new RelativeBy(by);
9595
}
9696

0 commit comments

Comments
 (0)