org.openqa.selenium.internal
Class AsyncJavascriptExecutor
java.lang.Object
org.openqa.selenium.internal.AsyncJavascriptExecutor
public class AsyncJavascriptExecutor
- extends java.lang.Object
Utility class used to execute "asynchronous" scripts. This class should
only be used by browsers that do not natively support asynchronous
script execution.
Warning: this class is intended for internal use
only. This class will be removed without warning after all
native asynchronous implemenations have been completed.
|
Method Summary |
java.lang.Object |
executeScript(java.lang.String script,
java.lang.Object... args)
Executes an asynchronous script in the context of the current page and
frame. |
void |
setTimeout(long timeout,
java.util.concurrent.TimeUnit timeoutUnit)
Sets the amount of time to wait for an asynchronous script to finish
execution before throwing an error. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AsyncJavascriptExecutor
public AsyncJavascriptExecutor(JavascriptExecutor executor,
long timeout,
java.util.concurrent.TimeUnit timeoutUnit)
setTimeout
public void setTimeout(long timeout,
java.util.concurrent.TimeUnit timeoutUnit)
- Sets the amount of time to wait for an asynchronous script to finish
execution before throwing an error. If the timeout is negative, then the
script will be allowed to run indefinitely.
- Parameters:
timeout - The timeout value.timeoutUnit - The unit of time for timeout.
executeScript
public java.lang.Object executeScript(java.lang.String script,
java.lang.Object... args)
- Executes an asynchronous script in the context of the current page and
frame.
- Parameters:
script - The script to execute.args - The script arguments.
- Returns:
- The script result.
- See Also:
JavascriptExecutor.executeAsyncScript(String, Object...)
Copyright © 2011. All Rights Reserved.