Skip to content

Record browser URL during action logging #7

@HaohanTsao

Description

@HaohanTsao

Description

Currently, the action logging mechanism does not capture the browser's current URL. This causes issues in the generated Selenium script, as it cannot start with the correct initial page, leading to test failures.

Steps to Reproduce

  1. Start recording interactions with AutoMouser without specifying a URL to navigate to.
  2. Navigate through multiple web pages and perform actions.
  3. Stop recording and generate the Selenium script.
  4. Attempt to execute the generated script.
  5. Observe that the script fails to initialize the correct page before proceeding with further actions.

Expected Behavior

The action logging should include the browser's current URL during recording. The generated Selenium script should then navigate to this URL at the start of the test.

Proposed Solution

  1. Modify the logging mechanism to capture and store the browser's current URL at each recorded action.
  2. Update the Selenium script generation logic to include a step that navigates to the captured URL at the beginning of the script.

Benefits

  • Makes the generated Selenium script robust and reliable for automation.
  • Enhances the AI-generated Selenium script by ensuring all page transitions are accurately reflected.
  • Provides more robust coverage for real-world browser interactions, making the tool suitable for more complex use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions