webdriver

The property to get the current instance of Selenium's WebDriver.

Syntax

py.webdriver -> WebDriver

Usage

correct usage
py.webdriver
incorrect usage
py.webdriver()

Arguments

  • None

Yields

  • WebDriver - The current instance of Selenium WebDriver that Pylenium is wrapping

Examples

Most scenarios won't need this, but it's provided just in case. The biggest reasons to use py.webdriver

  • access functionality that may not exist in Pylenium

  • functionality that requires you pass in a WebDriver

# get WebDriver's current Capabilities
caps = py.webdriver.capabilities
# function requires a WebDriver
actions = ActionChains(py.webdriver)

Last updated