org.openqa.selenium.remote.RemoteWebElement#sendKeys ( )源码实例Demo

下面列出了org.openqa.selenium.remote.RemoteWebElement#sendKeys ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: teammates   文件: AppPage.java
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);
    }
}
 
源代码2 项目: teammates   文件: AppPage.java
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);
    }
}