Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple docs for Driver #245

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/docs/modules/driver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Driver

### Overview
The Driver module provides an interface for interacting with web browsers. This module offers additional utility functions for easier browser automation and interaction.

## SeleniumDriver

At the moment, our Driver only supports Selenium Web Drivers. By default, it starts a headless session with a clean profile.

### Parameters

- **headless** (`bool` optional): hide/show the browser UI. `False` by default.
- **user_data_dir** (`str` optional): start Chrome from an existing profile.

Provide the path to your chrome sessions to start Chrome with your profile. Leave it empty to start a fresh Chrome session everytime. This helps not having to log in to your sites everytime, or mitigate bot protection.

### Example

Here's an example of how to initialize `SeleniumDriver` to display the browser interface and start the session from your profile.

```python
from lavague.drivers.selenium import SeleniumDriver
driver = SeleniumDriver(headless=False, chrome_user_dir="path/to/your/chrome/profile")
```
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ nav:

# - 🌎 Word Model:

- 🧩 Modules:
- Driver: "docs/modules/driver.md"

- ✅ Use cases:
- Knowledge Retrieval:
- Navigate through Notion: "docs/use-cases/notion.md"
Expand Down
Loading