Sessions
Last updated
Was this helpful?
Last updated
Was this helpful?
Before we can send any command to the browser we drive we need to create a session. This should be always the first step of interaction through the protocol. After executing this command the browser will be started and ready to receive the commands. As part of session creation we have to provide the url of WebDriver protocol compliant server. This can be a locally running browser driver server (, , etc.), or cloud provider url (, , .etc.). Also we can set the browser and operating system parameters we want to interact with.
PARAMETERS
options
: - Object with configuration for new session creation
RETURNS
Promise<>
EXAMPLES
SEE ALSO
To be able to verify if the WebDriver server is ready for new session creation sometimes it can be useful to query it's status. This function queries the WebDriver server's current status. The status contains meta information about the WebDriver server and operating system.
PARAMETERS
url
: string - Location of WebDriver API
RETURNS
EXAMPLES
SEE ALSO
This object represents a WebDriver session.
SEE ALSO
Close the session.
RETURNS
Promise<void>
EXAMPLES
SEE ALSO
PROPERTIES
url
: string - WebDriver server URL
desiredCapabilities?
: object - Legacy WebDriver capabilities. Can be used to enable the new W3C dialect
browserstack.use_w3c
: boolean
headers?
: Headers - Session creation request headers. Can be used for authorization.
WebDriver status object
PROPERTIES
message
: string
ready
: boolean
PROPERTIES
name
: string - Name of operating system
version
: string - Version of operating system
arch
: string - Operating system architecture
PROPERTIES
version
: string - Version of driver
Promise<>
capabilities
: - WebDriver capabilities
os
:
build
: