com.sdl.selenium.web.button.UploadButton Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Testy Show documentation
Show all versions of Testy Show documentation
Automated Acceptance Testing. Selenium and Selenium WebDriver test framework for web applications.
(optimized for dynamic html, ExtJS, Bootstrap, complex UI, simple web applications/sites)
The newest version!
package com.sdl.selenium.web.button;
import com.sdl.selenium.web.WebLocator;
public class UploadButton extends WebLocator {
public UploadButton() {
setClassName("UploadButton");
setTag("input");
}
public UploadButton(WebLocator container) {
this();
setContainer(container);
}
public UploadButton(WebLocator container, String id) {
this(container);
setId(id);
}
public boolean uploadFile(String path) {
return sendKeys(path) != null;
}
/*public void uploadFileWithJS(String path, String id) {
executeScript("return (function(id){var d=document.getElementById(id);d.style.visibility='visible';d.style.height='1px'; d.style.width='1px'; d.style.opacity=1;return d.getAttribute('style') != ''}('" + id + "'));");
sendKeys(path);
}*/
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy