Skip to content

Feature request: Command "send" hook #28

@jugglinmike

Description

@jugglinmike

My test runner fails when asynchronous tests run for longer than some given timeout. The bottleneck for each test is the communication with the browser instance through Leadfoot. Currently, to avoid timeout failures for long tests, I have two options:

  1. Set the timeout for all tests to the time required to run the longest test
  2. Set the timeout for each test according to its needs

While #1 is succinct, it tends to make test failures require more time than necessary. #2 is more efficient, but it requires explicit management of the timeout value.

If the Leadfoot Command object offered a "send" hook as a signal each time it issued a command to the WebDriver server, then I could hook into this and re-set the timeout whenever any test attempted to communicate with the server. This could be implemented as a generic event, but for this use case, a single callback provided to the Command constructor would also work.

Would the maintainers consider a feature like this in scope? If so, I'd be happy to submit a patch!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions