Class ClearWithShortcut
java.lang.Object
com.codeborne.selenide.FluentCommand
com.codeborne.selenide.commands.Clear
com.codeborne.selenide.clearwithshortcut.ClearWithShortcut
- All Implemented Interfaces:
Command<SelenideElement>
Clean the input field value.
The standard Selenium method WebElement.clear()
does not help in case of
"tricky" inputs generated by Vue.js, React and other fancy frameworks.
That's why we need to clear the field value by emulating real user actions:
- Select the whole text
- press "Delete"
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Clear the input content without triggering "change" and "blur" eventsprotected void
clearWithShortcut
(Driver driver, org.openqa.selenium.WebElement input) protected Platform
getPlatform
(Driver driver) Methods inherited from class com.codeborne.selenide.commands.Clear
blurSafely, clearAndTrigger, execute
Methods inherited from class com.codeborne.selenide.FluentCommand
execute