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

Support functions for message in driver.wait() #8094

Merged
merged 7 commits into from
Mar 31, 2020

Conversation

jackall3n
Copy link
Contributor

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Supporting functions for message in driver.wait().

Description

This change allows users to pass a function that resolves an error message when the driver.wait() condition fails. Currently a string can be passed to the wait() method, now () => string can also be passed.

Motivation and Context

Currently a user only has the ability to pass a message containing information about the step at the beginning of the test. Giving a user the ability to pass a function that resolves a message allows the message to contain information that is made available at the end of the test. The motivation for this PR is to be able to write out information about the current state of the test results after a timeout period has expired.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@AutomatedTester AutomatedTester merged commit 18cc5ba into SeleniumHQ:master Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants