webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO
https://webdriverio-community.github.io/wdio-vscode-service/
MIT License
33 stars 28 forks source link

InputBox clear method behavior #84

Open degrammer opened 11 months ago

degrammer commented 11 months ago

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.

christian-bromann commented 11 months ago

@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 commented 11 months ago

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