| 389 | } |
| 390 | |
| 391 | private abstract static class BaseW3CLocator extends By implements Remotable { |
| 392 | private final Parameters params; |
| 393 | |
| 394 | protected BaseW3CLocator(String using, String value) { |
| 395 | this.params = new Parameters(using, value); |
| 396 | } |
| 397 | |
| 398 | @Override |
| 399 | public WebElement findElement(SearchContext context) { |
| 400 | Require.nonNull("Search Context", context); |
| 401 | return context.findElement(this); |
| 402 | } |
| 403 | |
| 404 | @Override |
| 405 | public List<WebElement> findElements(SearchContext context) { |
| 406 | Require.nonNull("Search Context", context); |
| 407 | return context.findElements(this); |
| 408 | } |
| 409 | |
| 410 | @Override |
| 411 | public final Parameters getRemoteParameters() { |
| 412 | return params; |
| 413 | } |
| 414 | |
| 415 | protected final Map<String, @Nullable Object> toJson() { |
| 416 | return getRemoteParameters().toJson(); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | private abstract static class PreW3CLocator extends By implements Remotable { |
| 421 | private final Parameters remoteParams; |
nothing calls this directly
no outgoing calls
no test coverage detected