-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fill field in numeric value with slider appends the value into the current one. #45
Comments
Please provide your test code, configuration and example of HTML. |
<input type="number" id="sliderInput" min="1" max="666.00" step="1"> I->fillfield('#sliderInput','1'); |
I am using selenium docker the latest.Codeception version the latest. |
Do you want the yml configuration? |
Suggestions:
|
I run xdebug on web driver functions and I see that it does not clear the field.The I ->clearField function does not work. /**
* If this element is a TEXTAREA or text INPUT element, this will clear the value.
*
* @return WebDriverElement The current instance.
*/
public function clear(); I see the following I have declared it as a numeric field maybe that could be the problem.But I have the same field with the same characteristics and it works perfectly fine. $I->executeJS('$("' . $sliderInput . '").val(arguments[0])', [$value]);
$I->executeJS(''$("' . $sliderInput . '").blur()"); I am using chrome latest version. |
Also I have something extra in that field it has a format of of two desimals. |
I am doing two and three currently I will tell you the results after my tests. |
We stumbled over the same problem (using Chrome 71 and Codeception 2.5.1):
After looking at the Codeception source code it is obvious why And the reason or root cause seems to be the This leads to our workaround based on preventing the loss of focus by (1) selecting everything (in the field) and (2) immediately overwriting the selection (= old value) with the (new) desired value: Frankly I am not sure if it would be desirable or common in Codeception source code to implement this rather special auto-magic handling? |
Oops, sorry, I must correct myself:
However, in our mind it is still (very much) debatable, whether or not the Codeception implementation for |
What are you trying to achieve?
I am trying to fill the field with a simple value.
What do you get instead?
The value is appended at the end of the current value.
The text was updated successfully, but these errors were encountered: