Skip to content

Why the clearing approach of "setValue" method was changed compared to the Selenium2 driver? #21

@aik099

Description

@aik099

The Selenium2 driver was typing Backspace (for Windows) + Delete (for Mac) keys to the input/textarea in the amount needed to erase the current value. That allowed any JavaScript code of that page, that monitored input/textarea value change (e.g., to prevent certain keys from being typed) to behave as if a real human was doing this.

This driver uses the clear method of the WebDriver to clear the input/textarea value.

Does it fire necessary JS keyboard events in the process as well in every Selenium+Browser combination being tested?

P.S.

  • We're likely not having tests to verify that behavior.
  • The clear WebDriver method might be changing element focus, which might fire a duplicate focus/blur event when using clear+sendKeys together.

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