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

detect if page.evaluate() works properly #582

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

ticapix
Copy link
Contributor

@ticapix ticapix commented Feb 6, 2025

error handling for #541

@CLAassistant
Copy link

CLAassistant commented Feb 6, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

codebeaver-ai bot commented Feb 6, 2025

I opened a Pull Request with the following:

🔄 1 test added and 1 test updated to reflect recent changes.
🐛 No bugs detected in your changes
🛠️ 1/8 tests passed

🔄 Test Updates

I've updated 1 tests. They all pass ☑️
Updated Tests:

  • tests/test_service.py 🩹

    Fixed: tests/test_service.py::TestRegistry::test_execute_action_with_and_without_browser_context

🐛 Bug Detection

No bugs detected in your changes. Good job!

🛠️ Test Results

1/8 tests passed ⚠️

tests/test_dropdown.py

View error
tests/test_dropdown.py:20: in <module>
    llm = ChatOpenAI(model='gpt-4o')
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_dropdown.py

tests/test_dropdown_complex.py

View error
tests/test_dropdown_complex.py:20: in <module>
    llm = ChatOpenAI(model='gpt-4o')
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_dropdown_complex.py

tests/test_dropdown_error.py

View error
tests/test_dropdown_error.py:20: in <module>
    llm = ChatOpenAI(model='gpt-4o')
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_dropdown_error.py

tests/test_gif_path.py

View error
tests/test_gif_path.py:19: in <module>
    llm = ChatOpenAI(model='gpt-4o')
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_gif_path.py

tests/test_models.py

View error
tests/test_models.py:54: in <module>
    ChatOpenAI(
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_models.py

tests/test_react_dropdown.py

View error
tests/test_react_dropdown.py:20: in <module>
    llm = ChatOpenAI(model='gpt-4o')
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_react_dropdown.py

tests/test_vision.py

View error
tests/test_vision.py:25: in <module>
    llm = ChatOpenAI(model='gpt-4o')
/usr/local/lib/python3.11/site-packages/langchain_core/load/serializable.py:125: in __init__
    super().__init__(*args, **kwargs)
/usr/local/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:622: in validate_environment
    self.root_client = openai.OpenAI(**client_params, **sync_specific)  # type: ignore[arg-type]
/usr/local/lib/python3.11/site-packages/openai/_client.py:110: in __init__
    raise OpenAIError(
E   openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable

tests/test_vision.py

☂️ Coverage Improvements

Coverage improvements by file:

  • tests/test_service.py

    New coverage: 40.00%
    Improvement: +40.00%

🎨 Final Touches

  • I ran the hooks included in the pre-commit config.

Settings | Logs | CodeBeaver

@MagMueller
Copy link
Collaborator

fixed

MagMueller added a commit that referenced this pull request Feb 12, 2025
…()-works-properly

#582 detect if page.evaluate() works properly
@MagMueller MagMueller merged commit 9dc3be5 into browser-use:main Feb 12, 2025
3 checks passed
@ticapix ticapix deleted the patch-2 branch February 12, 2025 07:09
AryamanParida pushed a commit to AryamanParida/browser-use that referenced this pull request Mar 7, 2025
AryamanParida pushed a commit to AryamanParida/browser-use that referenced this pull request Mar 7, 2025
…etect-if-page.evaluate()-works-properly

browser-use#582 detect if page.evaluate() works properly
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.

3 participants