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

InputBox clear method behavior #84

Open
degrammer opened this issue Oct 20, 2023 · 2 comments
Open

InputBox clear method behavior #84

degrammer opened this issue Oct 20, 2023 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@degrammer
Copy link
Contributor

degrammer commented Oct 20, 2023

I'm not sure if is the expected behavior, but calling the clear method from InputBox, only clears the last character.

clear-bug

Expected behavior:
All the text of the input box should be cleared.

As a temporary workaround iterate all the characters and invoke the clear method.

  const inputBox = new InputBox(workbench.locatorMap)
  const placeholderChars = (await inputBox.getPlaceHolder()).length
  for (let index = 0; index < placeholderChars; index++) {
     await inputBox.clear()
   }

Happy to contribute with a fix if the issue is confirmed.

Thank you for such amazing tool.

@degrammer degrammer changed the title InputBox clear method behaviour InputBox clear method behavior Oct 20, 2023
@christian-bromann
Copy link
Contributor

@degrammer thanks for raising the issue.

You are right, it should clear the whole input rather than just a single character.

Any contributions are welcome!

@degrammer
Copy link
Contributor Author

Good to know. I will take a look then! 👍🏽

@christian-bromann christian-bromann added the help wanted Extra attention is needed label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants