StartWebSession
starts a web session and returns a web session object.
StartWebSession["browser"]
starts a web session using the specified browser.
Details and Options
- StartWebSession creates a WebSessionObject that represents a web browser being controlled by WebExecute.
- By default, StartWebSession will bring up a visible web browser window on the screen. Commands in the web session will then be executed visibly in this window.
- StartWebSession supports the following option:
-
Visible True whether the web browser window is visible - Possible choices of "browser" include:
-
"Chrome" Google Chrome web browser "Firefox" Mozilla Firefox web browser - StartWebSession updates $CurrentWebSession to the WebSessionObject it creates.
- DeleteObject[WebSessionObject[…]] ends a session started by StartWebSession.
Examples
open allclose allBasic Examples (2)
Start a web session with a "Chrome" browser:
Open a webpage, then capture it as an Image:
End the session with DeleteObject:
Sessions are persistent across calls to WebExecute:
End the session with DeleteObject:
Text
Wolfram Research (2019), StartWebSession, Wolfram Language function, https://reference.wolfram.com/language/ref/StartWebSession.html.
CMS
Wolfram Language. 2019. "StartWebSession." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StartWebSession.html.
APA
Wolfram Language. (2019). StartWebSession. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StartWebSession.html