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
Missing text/selection manipulation primitives #388
Comments
Andreas Tolfsen:
|
I'm not sure if this is entirely related or if it's the right place to report that, but one use case where the lack of text selection/caret positioning lacks is a very simple one :
Currently I found a way to set the caret position, but this feels like a common use case and perhaps a built-in function (ie. On the other hand, |
You can sendKeys the HOME, END, ARROW_LEFT and ARROW_RIGHT keys, which allows you to set the carat position. |
Well, as a workaround to
but somehow none of that worked too. Either way, I do think |
I could certainly argue that if the element currently has focus, the caret position should not be changed. I can't remember exactly why that isn't the case, but I'm afraid it's unlikely to be changed in the spec at this point... I wonder if anyone else can remember the details here? |
@illicitonion In your comment few weeks ago, you were saying :
Would you by any chance have a working example where a script sends at least on key to an input? |
The selenium "send keys" command sets the caret position to the end of the string to facilitate users doing interesting things in a loop from the local end: early bug reports and usage suggested they'd always want to append content rather than replace what's existing. There's a strong case for what @illicitonion suggested if the focus is already in the element, but it depends on whether we have enough time to get the implementation in place or not. If you're using the selenium python bindings and marionette, the following should work:
You should see the search box contain "hello World". These APIs are a good candidate for Level 2. |
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29135
w3c.org@masklinn.net:
The text was updated successfully, but these errors were encountered: