Being pretty new to Codeception I am having a problem with the following code:
$I->click("a.slideout-toggle-add-employee");
$I->wait(2);
$I->seeElement(Locator::find('input', ['placeholder' => 'Vorname']));
$I->fillField(Locator::find('input', ['placeholder' => 'Vorname']),"Testerina");
$I->wait(2);
The output when running codecept run
is like this:
I click "a.slideout-toggle-add-employee"
I wait 2
I see element "//input[@placeholder = 'Vorname']"
I fill field "//input[@placeholder = 'Vorname']","Testerina"
Screenshot and page source were saved into '...' dir
ERROR
In my setup I am using selenium-standalone and the following configuration:
class_name: AcceptanceTester
actor: AcceptanceTester
modules:
enabled:
- WebDriver:
url: 'http://localhost:19080/'
browser: chrome
host: '127.0.0.1'
port: 4444
restart: false
window_size: 1920x1080
- \Helper\Acceptance
- Asserts
In a similar question I have read that fillField can be a problem with PhpBrowser but this does not answer my question: seeInField finds the element, while fillField doesn't - CodeCeption
The is probably delivered via ajax within the page but as the element is found with the locator I do not understand what is wrong. What am I missing?
source https://stackoverflow.com/questions/68957861/codeception-with-webdriver-i-fillfield-not-working-although-the-field-is-seen
Comments
Post a Comment