Skip to content

Commit

Permalink
base driver and cloud driver
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrunel committed Oct 1, 2024
1 parent 83429b2 commit 9bc72fa
Show file tree
Hide file tree
Showing 9 changed files with 751 additions and 531 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from lavague.drivers.cloud.base import CloudDriver
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from lavague.sdk.client import LaVagueClient
from lavague.sdk.driver import BaseDriver
from lavague.sdk.base_driver import BaseDriver


class CloudDriver(BaseDriver):
Expand Down
15 changes: 15 additions & 0 deletions lavague-integrations/drivers/lavague-drivers-cloud/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.poetry]
name = "lavague-drivers-cloud"
version = "0.1.0"
description = "Remote driver to interact directly with the cloud's driver"
authors = ["lavague-ai"]
license = "Apache-2.0"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Callable, Optional, Any, Mapping, Dict, List
from lavague.core.utilities.format_utils import extract_code_from_funct
from playwright.sync_api import Page, Locator
from lavague.core.base_driver import (
from lavague.sdk.base_driver import (
BaseDriver,
JS_GET_INTERACTIVES,
JS_WAIT_DOM_IDLE,
Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(
# Before modifying this function, check if your changes are compatible with code_for_init which parses this code
# these imports are necessary as they will be pasted to the output
def default_init_code(self) -> Page:
from lavague.core.base_driver import JS_SETUP_GET_EVENTS
from lavague.sdk.base_driver import JS_SETUP_GET_EVENTS

try:
from playwright.sync_api import sync_playwright
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from selenium.webdriver.support.ui import Select, WebDriverWait
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.common.actions.wheel_input import ScrollOrigin
from lavague.core.base_driver import (
from lavague.sdk.base_driver import (
BaseDriver,
JS_GET_INTERACTIVES,
JS_WAIT_DOM_IDLE,
Expand Down Expand Up @@ -88,7 +88,7 @@ def default_init_code(self) -> Any:
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from lavague.core.base_driver import JS_SETUP_GET_EVENTS
from lavague.sdk.base_driver import JS_SETUP_GET_EVENTS

if self.options:
chrome_options = self.options
Expand Down
Loading

0 comments on commit 9bc72fa

Please sign in to comment.