(WebDriver driver)
| 36 | private final Handle handle; |
| 37 | |
| 38 | protected Module(WebDriver driver) { |
| 39 | Require.nonNull("WebDriver", driver); |
| 40 | if (!(driver instanceof HasBiDi)) { |
| 41 | throw new BiDiException("WebDriver does not support BiDi protocol"); |
| 42 | } |
| 43 | this.handle = ((HasBiDi) driver).getHandle(); |
| 44 | } |
| 45 | |
| 46 | protected final <X> X send(Command<X> command) { |
| 47 | return handle.send(command); |