Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6d99a25

Browse files
glibasbarancev
authored andcommittedFeb 2, 2016
[Java] Add toString() to DefaultElementLocator
Add toString() method to DefaultElementLocator and child classes in oder to display descriptive message instead of object's class name and hash code when TimeoutException is thrown while using PageFactory. Signed-off-by: Alexei Barantsev <barancev@gmail.com>
1 parent 8574144 commit 6d99a25

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎java/client/src/org/openqa/selenium/support/pagefactory/DefaultElementLocator.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,9 @@ public List<WebElement> findElements() {
8989

9090
return elements;
9191
}
92+
93+
@Override
94+
public String toString(){
95+
return this.getClass().getSimpleName() + " '" + by + "'";
96+
}
9297
}

0 commit comments

Comments
 (0)
Please sign in to comment.