Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.LocalFileDetector


        if (element instanceof WrapsElement) {
            element = ((WrapsElement) element).getWrappedElement();
        }
        if (element instanceof RemoteWebElement) {
            ((RemoteWebElement) element)
                    .setFileDetector(new LocalFileDetector());
        } else {
            throw new IllegalArgumentException(
                    "Expected argument of type RemoteWebElement, received "
                            + element.getClass().getName());
        }
View Full Code Here


    // Uncomment this if you wish to connect Opera manually:
    //settings.autostart(false);

    settings.logging().setLevel(Level.CONFIG);
    TestOperaDriver driver = new TestOperaDriver(settings);
    driver.setFileDetector(new LocalFileDetector());
    return driver;
  }
View Full Code Here

    private WebElement getNotProxiedInputElement() {
        return getWrappedElement().findElement(By.xpath("."));
    }

    private void setLocalFileDetector(RemoteWebElement element) {
        element.setFileDetector(new LocalFileDetector());
    }
View Full Code Here

    }


    public void to(final WebElement uploadFileField) {
        if (isRemoteDriver()) {
            LocalFileDetector detector = new LocalFileDetector();
            File localFile = detector.getLocalFile(osSpecificPathOf(filename));
            if (uploadFileField instanceof RemoteWebElement)
                ((RemoteWebElement) uploadFileField).setFileDetector(detector);
            String absolutePath = localFile.getAbsolutePath();
            uploadFileField.sendKeys(absolutePath);
        } else {
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.LocalFileDetector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.