I want to clear a form field with codeception.
$I->clearField('#example'); currently not supported.
Facebook Webdriver supported currently the clear() method. Example:
$this->webDriver->findElement(WebDriverBy::id('#amount"]'))->clear();
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
settings:
colors: true
bash
actor: AcceptanceTester
modules:
enabled:
- \Helper\Acceptance
- WebDriver
config:
WebDriver:
url: https://xxxxxxxxxxxxxxxxxx.com
browser: chrome
window_size: maximize
clear_cookies: true)
Copying my comment from StackOverflow:
Have you tried to use $I->fillField('#amount', ''); ?
I haven't, but this is the only way to achieve this with WebDriver.
If it doesn't work, you are welcome to make a pull request to add clearField method to WebDriver module.
聽
Yes I did. Codeception only fills whitespaces, or doesn't do anything. I will try to fix this problem with my first pull request on github ;)
@eknej thanks, waiting for your pull request then :)
If the php-webdriver has it WebDriver module needs to have it too!
@DavertMik when you Merge this method?
Most helpful comment
Yes I did. Codeception only fills whitespaces, or doesn't do anything. I will try to fix this problem with my first pull request on github ;)