(SearchContext context)
| 149 | } |
| 150 | |
| 151 | protected JavascriptExecutor getJavascriptExecutor(SearchContext context) { |
| 152 | WebDriver driver = getWebDriver(context); |
| 153 | |
| 154 | if (!(driver instanceof JavascriptExecutor)) { |
| 155 | throw new IllegalArgumentException( |
| 156 | "Context does not provide a mechanism to execute JS: " + context); |
| 157 | } |
| 158 | |
| 159 | return (JavascriptExecutor) driver; |
| 160 | } |
| 161 | |
| 162 | @Override |
| 163 | public boolean equals(@Nullable Object o) { |