-
Notifications
You must be signed in to change notification settings - Fork 453
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
switchTo with empty string should throw error #1057
Comments
targetUrl is of type string why should it throw |
Agree, but it should be a mix. The type of the argument also indicates that what's possible and the user can discover the support for regex. the message can be In this case however, I think it should not switch to "" as there is not tab or window with that name so more importantly it should raise an error saying
|
* Throw error when supplied targetUrl to switchTo is empty #1057 * Checked for only spaces #1057 * Remove period The full message is "Error: Cannot switch to tab or window. Hint: The targetUrl is empty. Please use a valid string or regex, run `.trace` for more info." * Update test/unit-tests/switchTo.test.js The full message is "Error: Cannot switch to tab or window. Hint: The targetUrl is empty. Please use a valid string or regex, run `.trace` for more info." * Update test/unit-tests/switchTo.test.js The entire message is "Error: Cannot switch to tab or window. Hint: The targetUrl is empty. Please use a valid string or regex, run `.trace` for more info." Co-authored-by: Vinay Shankar Shukla <vinaysh@thoughtworks.com> Co-authored-by: Zabil Cheriya Maliackal <zabil@users.noreply.github.com>
Expected behavior
switchTo("")
should throw the below error.Actual behavior
Versions
The text was updated successfully, but these errors were encountered: