Skip to content

fillField() ignores performOn() #79

Closed
@mbrodala

Description

@mbrodala

Given the following basic form structure:

<label for="title-1">Title</label>
<input id="title-1">

<div class="nested">
    <label for="title-2">Title</label>
    <input id="title-2">
</div>

The following snippet will always fill the first Title field instead of the second one:

$I->performOn(
    ['class' => 'nested'],
    ActionSequence::build()->fillField('Title', 'Test')
);

The reason for this is that WebDriver::fillField() uses the internal WebDriver::findFields() method and that one always uses $this->webDriver (the RemoteWebDriver instance) as base instead of WebDriver::getBaseElement().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions