I.clearField and I.fillField not working as expected.
See original GitHub issueWhat are you trying to achieve?
Replace text in field using I.fillField or clearing text with I.clearField.
What do you get instead?
If the field has the following text already in it: “hello” and I try to replace with “world” I get “helloworld”. If I try to use I.clearField the text in the field does not change.
Provide console output if related. Use
--verbose
mode for more details.
No errors thrown.
Provide test source code if related
I.clearField(selectors.name);
I.fillField(selectors.name, name);
Details
- CodeceptJS version: 6.2
- NodeJS Version: v7.8.0
- Operating System: MacOS Sierra v10.12.4
- Nightmare version: 2.10.0
- Nightmare Upload version: 0.1.1
- Configuration file:
{
"output": "./output",
"helpers": {
"nightmare": {
"url": "http://localhost:1079",
"restart": true,
"show": true,
"typeInterval": 5,
"windowSize": "1440x1024"
}
},
"include": {
"I": "./e2e-tests/steps/steps.js"
},
"mocha": {
"reporterOptions": {
"reportDir": "output"
}
},
"bootstrap": false,
"teardown": null,
"hooks": [],
"tests": "./e2e-tests/tests/**/*_test.js",
"timeout": 10000,
"name": "testing"
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Codeception with Webdriver $I->fillField not working although ...
Finally found an answer - there was some unknown hidden element which matched the same selector and this element caused an Exception:.
Read more >clearField() not working in codeceptjs
I am clearing first field and entering data. Exm: I.clearField(this.fields.secATabLname); //xpath:this.fields.secATabLname I.fillField(this.
Read more >WebDriver - CodeceptJS
Fills a text field or textarea, after clearing its value, with the given string. Field is located by name, label, CSS, or XPath....
Read more >Protractor - CodeceptJS
Protractor helper is based on Protractor library and used for testing web ... strict locator I.fillField({css: 'form#login input[name=username]'}, 'John'); ...
Read more >npm:@codeceptjs/detox-helper | Skypack
Testing Mobile Apps on iOS and Android can look like this: I.setLandscapeOrientation(); I.fillField ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use this custom step, works perfectly:
Add to steps_file.js:
@jmitchell89 is correct, that this affects react projects, as I’ve also observed. I created a custom helper, which solves the problem. Add this to your
custom_steps.js
(or whatever you named it) file:Then you can do for example: