use of org.openqa.selenium.remote.RemoteWebDriver in project android by owncloud.
the class Common method takeScreenShotOnFailed.
protected void takeScreenShotOnFailed(String testName) throws IOException {
File file = ((RemoteWebDriver) driver).getScreenshotAs(OutputType.FILE);
SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd");
Date today = Calendar.getInstance().getTime();
String screenShotName = "ScreenShots/" + dt1.format(today) + "/" + testName + ".png";
FileUtils.copyFile(file, new File(screenShotName));
}
use of org.openqa.selenium.remote.RemoteWebDriver in project Asqatasun by Asqatasun.
the class FirefoxDriverFactory method make.
/**
*
* @param config
* @return A FirefoxDriver.
*/
@Override
public RemoteWebDriver make(HashMap<String, String> config) {
FirefoxBinary ffBinary = new FirefoxBinary();
if (System.getProperty(DISPLAY_PROPERTY) != null) {
ffBinary.setEnvironmentProperty(DISPLAY_PROPERTY.toUpperCase(), System.getProperty(DISPLAY_PROPERTY));
} else if (System.getenv(DISPLAY_PROPERTY.toUpperCase()) != null) {
ffBinary.setEnvironmentProperty(DISPLAY_PROPERTY.toUpperCase(), System.getenv(DISPLAY_PROPERTY.toUpperCase()));
}
RemoteWebDriver remoteWebDriver = new FirefoxDriver(ffBinary, firefoxProfile);
if (screenHeight != -1 && screenWidth != -1) {
remoteWebDriver.manage().window().setSize(new Dimension(screenWidth, screenHeight));
}
return remoteWebDriver;
}
use of org.openqa.selenium.remote.RemoteWebDriver in project rstudio by rstudio.
the class RStudioWebAppDriver method start.
public static WebDriver start() throws Exception {
driver_ = new RemoteWebDriver(new URL("http://localhost:9515/"), DesiredCapabilities.chrome());
driver_.get("http://localhost:4011/");
return driver_;
}
use of org.openqa.selenium.remote.RemoteWebDriver in project getting-started-java by GoogleCloudPlatform.
the class UserJourneyTestIT method setup.
@Before
public void setup() {
driver = new RemoteWebDriver(service.getUrl(), DesiredCapabilities.chrome());
filePath = this.getClass().getResource(IMAGE_FILENAME).getPath();
}
use of org.openqa.selenium.remote.RemoteWebDriver in project android by nextcloud.
the class Common method takeScreenShotOnFailed.
protected void takeScreenShotOnFailed(String testName) throws IOException {
File file = ((RemoteWebDriver) driver).getScreenshotAs(OutputType.FILE);
SimpleDateFormat dt1 = new SimpleDateFormat("yyyy-MM-dd");
Date today = Calendar.getInstance().getTime();
String screenShotName = "ScreenShots/" + dt1.format(today) + "/" + testName + ".png";
FileUtils.copyFile(file, new File(screenShotName));
}
Aggregations