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

Added Cookie accepter #578

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Added Cookie accepter #578

wants to merge 1 commit into from

Conversation

dhuynh95
Copy link
Collaborator

Added some class to facilitate data collection by automatically accepting cookies.

Example of usage:

# Install necessary elements
from lavague.drivers.selenium import SeleniumDriver
from lavague.core import ActionEngine, WorldModel
from lavague.core.agents import WebAgent

# Set up our three key components: Driver, Action Engine, World Model
driver = SeleniumDriver(headless=False)
action_engine = ActionEngine(driver)
world_model = WorldModel()

# Create Web Agent
agent = WebAgent(world_model, action_engine)

# Set URL
driver.get("https://www.google.com")

from lavague.core.utilities.cookie import CookieAccepter

cookie_accepter = CookieAccepter(driver, world_model.mm_llm, action_engine.navigation_engine)
cookie_accepter.accept_cookies()

@dhuynh95 dhuynh95 requested a review from mbrunel August 20, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant