| 418 | } |
| 419 | |
| 420 | private abstract static class PreW3CLocator extends By implements Remotable { |
| 421 | private final Parameters remoteParams; |
| 422 | private final ByCssSelector fallback; |
| 423 | |
| 424 | private PreW3CLocator(String using, String value, String formatString) { |
| 425 | this.remoteParams = new Remotable.Parameters(using, value); |
| 426 | this.fallback = new ByCssSelector(String.format(formatString, Css.escape(value))); |
| 427 | } |
| 428 | |
| 429 | @Override |
| 430 | public WebElement findElement(SearchContext context) { |
| 431 | return context.findElement(fallback); |
| 432 | } |
| 433 | |
| 434 | @Override |
| 435 | public List<WebElement> findElements(SearchContext context) { |
| 436 | return context.findElements(fallback); |
| 437 | } |
| 438 | |
| 439 | @Override |
| 440 | public final Parameters getRemoteParameters() { |
| 441 | return remoteParams; |
| 442 | } |
| 443 | |
| 444 | protected final Map<String, @Nullable Object> toJson() { |
| 445 | return fallback.toJson(); |
| 446 | } |
| 447 | } |
| 448 | } |
nothing calls this directly
no outgoing calls
no test coverage detected