Java Code Examples for org.openqa.selenium.remote.RemoteWebElement#clear()
The following examples show how to use
org.openqa.selenium.remote.RemoteWebElement#clear() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppPage.java From teammates with GNU General Public License v2.0 | 5 votes |
protected void fillFileBox(RemoteWebElement fileBoxElement, String fileName) { if (fileName.isEmpty()) { fileBoxElement.clear(); } else { fileBoxElement.setFileDetector(new UselessFileDetector()); String filePath = new File(fileName).getAbsolutePath(); fileBoxElement.sendKeys(filePath); } }
Example 2
Source File: AppPage.java From teammates with GNU General Public License v2.0 | 5 votes |
protected void fillFileBox(RemoteWebElement fileBoxElement, String fileName) { if (fileName.isEmpty()) { fileBoxElement.clear(); } else { fileBoxElement.setFileDetector(new UselessFileDetector()); String newFilePath = new File(fileName).getAbsolutePath(); fileBoxElement.sendKeys(newFilePath); } }