# webdriver

## Syntax

```
py.webdriver -> WebDriver
```

## Usage

{% code title="correct usage" %}

```python
py.webdriver
```

{% endcode %}

{% code title="incorrect usage" %}

```python
py.webdriver()
```

{% endcode %}

## Arguments

* None

## Yields

* <mark style="color:orange;">**WebDriver**</mark>  - 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 <mark style="color:purple;">`py.webdriver`</mark>

* access functionality that may not exist in Pylenium
* functionality that requires you pass in a WebDriver

```python
# get WebDriver's current Capabilities
caps = py.webdriver.capabilities
```

```python
# function requires a WebDriver
actions = ActionChains(py.webdriver)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pylenium.io/driver-commands/webdriver.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
