File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
java/src/org/openqa/selenium Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ public static By cssSelector(String cssSelector) {
121121 public WebElement findElement (SearchContext context ) {
122122 List <WebElement > allElements = findElements (context );
123123 if (allElements == null || allElements .isEmpty ()) {
124- throw new NoSuchElementException ("Cannot locate an element using " + toString () );
124+ throw new NoSuchElementException ("Cannot locate an element using " + this );
125125 }
126126 return allElements .get (0 );
127127 }
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ public WebElement findElement(SearchContext context) {
5454 return elements .get (0 );
5555 }
5656 }
57- throw new NoSuchElementException ("Cannot locate an element using " + toString () );
57+ throw new NoSuchElementException ("Cannot locate an element using " + this );
5858 }
5959
6060 @ Override
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public ByChained(By... bys) {
5252 public WebElement findElement (SearchContext context ) {
5353 List <WebElement > elements = findElements (context );
5454 if (elements .isEmpty ())
55- throw new NoSuchElementException ("Cannot locate an element using " + toString () );
55+ throw new NoSuchElementException ("Cannot locate an element using " + this );
5656 return elements .get (0 );
5757 }
5858
You can’t perform that action at this time.
0 commit comments