Interacting With WebDriver
On this page you'll learn about all of the different methods that the Simple Selenium WebDriver class has to offer
Introduction
The WebDriver class contains all of the Simple Selenium functionality wrapped into an easy-to-use class. On this page, you'll learn how to use the WebDriver class in your web-scraping & general automation projects.
List of All Simple Selenium WebDriver Functions
Unwrap Driver
You can get the unwrapped Selenium webdriver object with:
Close Driver
You can do a clean shutdown of the webdriver web browser with:
Close Active Tab
Close just the active tab:
Visit a Web Page
Visiting a webpage:
Focus Document
Focuses the main document:
Focus IFrame
Focuses a target IFrame:
Focus Parent IFrame
Focuses the parent document/iframe:
Get Application Cache
Get application cache:
Get Browser Capabilities
Get browser capabilities:
Get Desired Browser Capabilities
Get desired browser capabilities:
Get Page Source
Get the current active page's source code:
Get Browser Name
Gets the browser name:
Get Timeouts
Gets driver timeouts:
Get File Detector
Gets file detector:
Get Virtual Auth ID
Gets virtual authenticator ID:
Get Window Handles
Gets active window handles:
Get Device Orientation
Gets device orientation:
Get Current Active Window Handle
Gets active window handle:
Get Web Page Title
Gets the title of the current active webpage:
Get Mobile Object
Gets the driver's mobile object:
Get Log Types
Gets log types:
Get Current URL
Gets the current active page URL:
Get Base64 Screenshot
Gets a base64 encoded string of screenshot img file:
Get PNG Screenshot
Gets a bytes encoded string of screenshot png file:
Save File Screenshot
Screenshots & saves as a file in target directory:
Add Browser Cookie
Adds a cookie dict to browser:
Add Credential
Adds authentication credentials:
Add Virtual Authenticator
Adds virtual authenticator:
Previous Page
Go back to previous page:
Delete All Cookies
Delete all browser cookies:
Delete Cookie By Name
Delete browser cookie by name:
Delete Downloadable Files
Delete downloadable files:
Download File
Download file by file name & directory:
Execute Async Script
Executes JS async script:
Execute Script
Executes JS script:
Forward Page
Go forward a page:
Full-Screen Window
Turn browser into full-screen mode:
Get Cookie By Name
Get cookie by name:
Get All Cookies
Get all cookies from browser:
Get All Credentials
Get all credentials:
Get Downloadable Files
Get downloadable file:
Get Log By Type
Get log from storage by type:
Get Pinned Scripts
Get pinned scripts:
Get Window Position
Get window position:
Get Window Rect
Gets window rect:
Get Window Size
Gets window size:
Implicitly Wait
Wait for x seconds:
Maximize Window
Maximizes the browser window:
Minimize Window
Minimizes the browser window:
Pin Script
Pins a script:
Print Page
Prints the page:
Refresh Page
Refreshes the webpage:
Remove All Credentials
Removes all credentials:
Remove Credential
Removes credential by ID:
Remove Virtual Authenticator
Removes virtual authenticator:
Set Page Load Time
Sets max page load time in seconds:
Set Script Load Time
Sets max script load time in seconds:
Set User Verified
Sets user verified:
Set Window Position
Sets window position in pixels:
Set Window Size
Sets window size:
Start Client
Starts client:
Start Session
Starts session:
Stop Client
Stops client:
Unpin Script By Key
Unpins script key:
Last updated