Skip to content

add support for selenium driver#6

Closed
malto101 wants to merge 4 commits intomainfrom
feature/main/selenium
Closed

add support for selenium driver#6
malto101 wants to merge 4 commits intomainfrom
feature/main/selenium

Conversation

@malto101
Copy link
Member

@malto101 malto101 commented Apr 3, 2025

Note: merge this after merging pydantic integration

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR integrates Pydantic models to improve configuration handling and type safety across the framework while adding support for the Selenium driver. It also refactors various modules (runner, logging, factories, APIs, etc.) with enhanced type annotations and clearer error handling.

  • Introduces Pydantic-based configuration models and updates existing data structures.
  • Refactors several modules for improved readability and consistency (e.g., logging, API endpoints, factories).
  • Adds support for Selenium driver and adjusts dependency mappings and session creation accordingly.

Reviewed Changes

Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
optics_framework/common/runner/test_runnner.py Switches TypedDicts to Pydantic models and adapts diff access accordingly.
optics_framework/common/runner/test.py Removes an outdated test file.
optics_framework/common/runner/keyword_register.py Adds explicit type annotations to the registry methods.
optics_framework/common/runner/csv_reader.py Incorporates Optional file path and additional checks in iterable parsing.
optics_framework/common/optics_builder.py Migrates driver and detection configurations to a new Pydantic configuration model.
optics_framework/common/logging_config.py Updates log formatting and handler initializations using config fields.
optics_framework/common/image_interface.py Updates documentation and type signatures for the image detection interface.
optics_framework/common/image_factory.py Renames methods and switches discovery to use a Pydantic configuration model.
optics_framework/common/expose_api.py Refactors API endpoints and transforms session configuration to align with Config.
optics_framework/common/execution.py Revises execution parameter models and improves result status checks.
optics_framework/common/elementsource_interface.py Updates type hints and docstrings for element source methods.
optics_framework/common/elementsource_factory.py Integrates Pydantic-based configuration for element sources.
optics_framework/common/driver_factory.py Integrates Pydantic-based configuration for driver discovery and instantiation.
optics_framework/common/config_handler.py Switches from dataclasses to Pydantic models and uses model_dump for YAML output.
optics_framework/common/base_factory.py Introduces a Pydantic-based FactoryState for module discovery and caching.
optics_framework/api/verifier.py Improves type annotations and streamlines docstrings for verification functions.
optics_framework/api/flow_control.py Introduces explicit runner checks and adds type annotations to flow control methods.
optics_framework/api/app_management.py Updates method signatures and error logging for application management.
optics_framework/api/action_keyword.py Adds type hints and refines decorators and method signatures for action keywords.
Comments suppressed due to low confidence (1)

optics_framework/common/runner/csv_reader.py:137

  • [nitpick] The explicit check 'if key is not None' may be redundant since CSV header keys are typically strings. Verify whether this check is necessary or if it can be removed.
if key is not None  # Add this check

"elements_sources": [{"name": DependencyConfig(enabled=True)} for name in config.elements_sources],
"text_detection": [{"name": DependencyConfig(enabled=True)} for name in config.text_detection],
"image_detection": [{"name": DependencyConfig(enabled=True)} for name in config.image_detection],
"project_path": config.project_path
Copy link

Copilot AI Apr 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The session configuration mapping references 'config.project_path' although the SessionConfig model does not define a 'project_path' field. Please consider adding this field to SessionConfig or updating the mapping accordingly.

Copilot uses AI. Check for mistakes.
@malto101 malto101 requested a review from davidamo9 April 4, 2025 09:45
@malto101 malto101 force-pushed the feature/main/selenium branch from 19d3a2a to a6fb71c Compare April 4, 2025 15:43
@malto101 malto101 closed this Apr 4, 2025
@malto101 malto101 deleted the feature/main/selenium branch April 4, 2025 15:50
sheshnath1st pushed a commit to sheshnath1st/optics-framework that referenced this pull request Jan 12, 2026
# This is the 1st commit message:

test(playwright): add unit test for app launch

# This is the commit message mozarkai#2:

test(playwright): verify youtube search box is clickable

# This is the commit message mozarkai#3:

test(playwright): verify youtube search box click with delay

# This is the commit message mozarkai#4:

test(playwright): change config sample

# This is the commit message mozarkai#5:

test(playwright): add youtube search box click and sleep test

# This is the commit message mozarkai#6:

test(playwright): add comprehensive framework feature coverage launch_app , add_and_get_element , clear_element_text , _flow , validation_methods , get_text
sheshnath1st pushed a commit to sheshnath1st/optics-framework that referenced this pull request Jan 12, 2026
# This is the 1st commit message:

refactor: centralize retry logic to remove duplication

# This is the commit message mozarkai#2:

refactor: centralize locator resolve+exists to eliminate duplication

# This is the commit message mozarkai#3:

refactor: collapse retry logic to single loop to eliminate duplication

# This is the commit message mozarkai#4:

refactor: remove duplicated assertion retry logic

# This is the commit message mozarkai#5:

refactor: remove duplicated percentage using method about

# This is the commit message mozarkai#6:

refactor: remove duplicated percentage using method about

# This is the commit message mozarkai#7:

refactor: remove duplicated percentage using method about

# This is the commit message mozarkai#8:

refactor: remove duplicated percentage using method about
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