MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / getJavascriptExecutor

Method getJavascriptExecutor

java/src/org/openqa/selenium/By.java:151–160  ·  view source on GitHub ↗
(SearchContext context)

Source from the content-addressed store, hash-verified

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) {

Calls 1

getWebDriverMethod · 0.95