# Driver

## The Driver Settings

Supported Drivers:

* **Chrome**
* **Edge**
* **Safari**
* **Firefox**
* **Internet Explorer**

&#x20;Let's take a look at the Driver Settings in <mark style="color:orange;">**pylenium.json**</mark>

{% code title="pylenium.json" %}

```javascript
"driver": {
    "browser": "chrome",
    "remote_url": "",
    "wait_time": 10,
    "page_load_wait_time": 0,
    "options": [],
    "capabilities": {},
    "experimental_options": null,
    "extension_paths": [],
    "webdriver_kwargs": {},
    "local_path": ""
}
```

{% endcode %}

Let's break each one of these down so you know what they are for and how you can configure them.

### browser

{% hint style="info" %}
Default is <mark style="color:yellow;">**`chrome`**</mark>
{% endhint %}

This is the browser name - <mark style="color:purple;">`"chrome"`</mark> or <mark style="color:purple;">`"firefox"`</mark> or <mark style="color:purple;">`"ie"`</mark> or <mark style="color:purple;">`"safari"`</mark> or <mark style="color:purple;">`"edge"`</mark>

{% code title="pylenium.json" %}

```javascript
"driver": {
    "browser": "firefox"
}
```

{% endcode %}

{% code title="Terminal" %}

```bash
pytest tests --browser=firefox
```

{% endcode %}

### remote\_url

{% hint style="info" %}
Default is empty o&#x72;**`""`**
{% endhint %}

This is used to connect to things like <mark style="color:yellow;">**Selenium Grid**</mark>**.**

{% hint style="success" %}
Check out [Run Tests in Containers](https://docs.pylenium.io/guides/run-tests-in-containers) for an example of how to do this locally with <mark style="color:yellow;">**Docker**</mark>
{% endhint %}

{% code title="pylenium.json" %}

```javascript
"driver": {
    "remote_url": "http://localhost:4444/wd/hub"
}
```

{% endcode %}

{% code title="Terminal" %}

```bash
pytest tests --remote_url="http://localhost:4444/wd/hub"
```

{% endcode %}

### wait\_time

{% hint style="info" %}
Default is <mark style="color:yellow;">**`10`**</mark>
{% endhint %}

The global number of seconds for actions to wait for.

{% code title="pylenium.json" %}

```javascript
"driver": {
    "wait_time": 7
}
```

{% endcode %}

{% code title="Terminal" %}

```bash
You cannot set this from the command line
```

{% endcode %}

### page\_load\_wait\_time

{% hint style="info" %}
Default is <mark style="color:yellow;">**0**</mark>
{% endhint %}

The amount of time to wait for the page to load before raising an error.

```bash
# set it globally in CLI
--page_load_wait_time 10
```

```javascript
// set it globally in pylenium.json
{
    "driver": {
        "page_load_wait_time": 10
    }
}
```

```python
# override the global page_load_wait_time just for the current test
py.set_page_load_timeout(10)
```

### options

{% hint style="info" %}
Default is empty or **`[]`**
{% endhint %}

A list of browser options to include when instantiating Pylenium.

{% code title="pylenium.json" %}

```javascript
"driver": {
    "options": ["headless", "incognito"]
}
```

{% endcode %}

{% code title="Terminal" %}

```bash
pytest tests --options="headless, incognito"
```

{% endcode %}

### experimental\_options

{% hint style="info" %}
Default is <mark style="color:yellow;">**`null`**</mark> or <mark style="color:yellow;">**`None`**</mark>
{% endhint %}

A list of experimental options to include in the driver. These can only be added using <mark style="color:orange;">**pylenium.json**</mark>

```javascript
{
    "experimental_options": [
        {"useAutomationExtension": false},
        {"otherName": "value"}
    ]
}
```

### capabilities

{% hint style="info" %}
Default is empty or `{}`
{% endhint %}

A dictionary of the desired capabilities to include when instantiating Pylenium.

{% code title="pylenium.json" %}

```python
{
    "driver": {
        "capabilities": {
            "enableVNC": true,
            "enableVideo": false,
            "name": "value"
        }
    }
}
```

{% endcode %}

{% code title="Terminal" %}

```python
pytest tests --caps = '{"name": "value", "boolean": true}'
```

{% endcode %}

### extension\_paths

The list of extensions to be included when instantiating Pylenium.

{% hint style="info" %}
Default is empty or `[]`
{% endhint %}

```javascript
{
    "driver": {
        "extension_paths": ["path_to_crx.crx", "other-path.crx"]
    }
}
```


---

# 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/configuration/driver.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.
