Add sendKeys method implementing Mink DriverInterface#302
Open
JordiGiros wants to merge 7 commits intominkphp:masterfrom
JordiGiros:master
Open
Add sendKeys method implementing Mink DriverInterface#302JordiGiros wants to merge 7 commits intominkphp:masterfrom JordiGiros:master
JordiGiros wants to merge 7 commits intominkphp:masterfrom
JordiGiros:master
Conversation
aik099
requested changes
Oct 18, 2018
aik099
reviewed
Oct 22, 2018
src/Selenium2Driver.php
Outdated
| $element = $this->findElement($xpath); | ||
| $elementName = strtolower($element->name()); | ||
|
|
||
| if ('select' === $elementName) { |
Member
There was a problem hiding this comment.
Why this IF is needed. Instead I'm proposing to allow only these elements in method:
inputHTML elements with specifictypeattribute values (already done)- maybe
textareaelements
Author
There was a problem hiding this comment.
So, do we want to accept selects?
If we only leave in the method the "input" IF, textarea input types will be accepted by default.
miiimooo
added a commit
to miiimooo/MinkSelenium2Driver
that referenced
this pull request
Dec 6, 2018
aik099
requested changes
Apr 17, 2021
Comment on lines
+1233
to
+1236
| if (in_array($elementName, array('input', 'textarea'))) { | ||
| $existingValueLength = strlen($element->attribute('value')); | ||
| $value = str_repeat(Key::BACKSPACE . Key::DELETE, $existingValueLength) . $value; | ||
| } |
Member
There was a problem hiding this comment.
If I understood @stof comment (see minkphp/Mink#767 (comment)) correctly, then this should be moved back to setValue method to allow sendKeys to send keys (as the name suggests) instead of replacing current input value with provided one (as the setValue method does).
edosenseidotcom
added a commit
to edosenseidotcom/MinkSelenium2Driver
that referenced
this pull request
Jun 11, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented method "sendKeys" in order to solve setting a value on autocomplete input elements as commented in 286, 292 and 301
Related to 767 PR open in Mink project.