You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -60,12 +60,15 @@ Method | Description
60
60
`driver.refresh()` | Refreshes the browser.
61
61
`driver.getElement(cssSelector)` | Finds an element on the page using the `cssSelector` and returns an Element.
62
62
`driver.getElements(cssSelector)` | Finds all elements on the page using the `cssSelector` and returns an array of Elements.
63
+
`driver.setTimeouts(type, milliseconds)` | Sets a timeout for a certain type of operation. Valid types are: "script" for script timeouts, "implicit" for modifying the implicit wait timeout and "page load" for setting a page load timeout.
63
64
`driver.setElementTimeout(milliseconds)` | Sets a timeout for WebDriver to find elements with `getElement` and `getElements`.
65
+
`driver.setScriptTimeout(milliseconds)` | Sets a timeout for WebDriver to execute async scripts with `evaluateAsync`.
64
66
`driver.getUrl()` | Returns the current url of the page.
65
67
`driver.getPageTitle()` | Returns the current page title.
66
68
`driver.getPageSource()` | Returns the current page's html source.
67
69
`driver.getScreenshot()` | Returns screenshot as a base64 encoded PNG.
68
70
`driver.evaluate(javascriptString)` | Executes the given javascript. It must contain a return statement in order to get a value back.
71
+
`driver.evaluateAsync(javascriptString)` | Executes the given asynchronous javascript. The executed script must signal that is done by invoking the provided callback, which is always provided as the final argument to the function.
69
72
`driver.setCookie(Cookie)` | Sets a cookie on the current page's domain. `Cookie = { name, value, path='/' }`
70
73
`driver.getCookies()` | Returns all cookies visible to the current page.
71
74
`driver.clearCookies()` | Deletes all cookies visible to the current page.
 | GET | `/sessions` | Returns a list of the currently active sessions.
111
114
 | GET | `/session/:sessionId` | Retrieve the capabilities of the specified session.
112
115
 | DELETE | `/session/:sessionId` | Delete the session.
113
-
 | POST | `/session/:sessionId/timeouts` | Configure the amount of time that a particular type of operation can execute for before they are aborted and a `Timeout` error is returned to the client.
114
-
 | POST | `/session/:sessionId/timeouts/async_script` | Set the amount of time, in milliseconds, that asynchronous scripts executed by `/session/:sessionId/execute_async` are permitted to run before they are aborted and a `Timeout` error is returned to the client.
116
+
 | POST | `/session/:sessionId/timeouts` | Configure the amount of time that a particular type of operation can execute for before they are aborted and a `Timeout` error is returned to the client.
117
+
 | POST | `/session/:sessionId/timeouts/async_script` | Set the amount of time, in milliseconds, that asynchronous scripts executed by `/session/:sessionId/execute_async` are permitted to run before they are aborted and a `Timeout` error is returned to the client.
115
118
 | POST | `/session/:sessionId/timeouts/implicit_wait` | Set the amount of time the driver should wait when searching for elements.
116
119
 | GET | `/session/:sessionId/window_handle` | Retrieve the current window handle.
117
120
 | GET | `/session/:sessionId/window_handles` | Retrieve the list of all window handles available to the session.
 | POST | `/session/:sessionId/forward` | Navigate forwards in the browser history, if possible.
121
124
 | POST | `/session/:sessionId/back` | Navigate backwards in the browser history, if possible.
122
125
 | POST | `/session/:sessionId/refresh` | Refresh the current page.
123
-
 | POST | `/session/:sessionId/execute` | Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
124
-
 | POST | `/session/:sessionId/execute_async` | Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
126
+
 | POST | `/session/:sessionId/execute` | Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
127
+
 | POST | `/session/:sessionId/execute_async` | Inject a snippet of JavaScript into the page for execution in the context of the currently selected frame.
125
128
 | GET | `/session/:sessionId/screenshot` | Take a screenshot of the current page.
126
129
 | GET | `/session/:sessionId/ime/available_engines` | List all available engines on the machine.
127
130
 | GET | `/session/:sessionId/ime/active_engine` | Get the name of the active IME engine.
0 commit comments