public WebElement findElement(By by) { return driverProvider.get().findElement(by); }
@AfterScenario public void afterScenario() throws Exception { driverProvider.end(); }
@BeforeScenario public void beforeScenario() throws Exception { driverProvider.initialize(); }
String currentUrl = "[unknown page title]"; try { currentUrl = driverProvider.get().getCurrentUrl(); } catch (Exception e) { savedIt = driverProvider.saveScreenshotTo(screenshotPath); } catch (RemoteWebDriverProvider.SauceLabsJobHasEnded e) { System.err.println("Screenshot of page '" + currentUrl + "' has **NOT** been saved. The SauceLabs job has ended, possibly timing out on their end."); savedIt = driverProvider.saveScreenshotTo(screenshotPath); } catch (Exception e1) { System.err.println("Screenshot of page '" + currentUrl + "' has **NOT** been saved to '" + screenshotPath + "' because error '" + e.getMessage() + "' encountered. Stack trace follows:");
String currentUrl = "[unknown page title]"; try { currentUrl = driverProvider.get().getCurrentUrl(); } catch (Exception e) { savedIt = driverProvider.saveScreenshotTo(screenshotPath); } catch (RemoteWebDriverProvider.SauceLabsJobHasEnded e) { System.err.println("Screenshot of page '" + currentUrl + "' has **NOT** been saved. The SauceLabs job has ended, possibly timing out on their end."); savedIt = driverProvider.saveScreenshotTo(screenshotPath); } catch (Exception e1) { System.err.println("Screenshot of page '" + currentUrl + "' has **NOT** been saved to '" + screenshotPath + "' because error '" + e.getMessage() + "' encountered. Stack trace follows:");
public void get(String url) { driverProvider.get().get(url); }
@BeforeStories public void beforeStories() throws Exception { driverProvider.initialize(); }
@AfterScenario public void afterScenario() throws Exception { driverProvider.end(); }
public WebElement findElement(By by) { return driverProvider.get().findElement(by); }
@BeforeStory public void beforeStory() throws Exception { driverProvider.initialize(); }
@AfterStory public void afterStory() throws Exception { driverProvider.end(); }
public void get(String url) { driverProvider.get().get(url); }
@BeforeScenario public void beforeScenario() throws Exception { driverProvider.initialize(); }
@AfterStories public void afterStories() throws Exception { driverProvider.end(); }
private void sendContextMessage(String step) { try { JavascriptExecutor je = (JavascriptExecutor) webDriverProvider.get(); je.executeScript("sauce:context=Step: " + step); } catch (Exception e) { } }
@BeforeStories public void beforeStories() throws Exception { driverProvider.initialize(); }
@AfterStory public void afterStory() throws Exception { driverProvider.end(); }
@Override public void failed(String step, Throwable cause) { try { passed.set(false); ((JavascriptExecutor) webDriverProvider.get()).executeScript("sauce:context=(Scenario failed)"); } catch (RemoteWebDriverProvider.SauceLabsJobHasEnded e) { // do nothing. } }
@BeforeStory public void beforeStory() throws Exception { driverProvider.initialize(); }
@AfterStories public void afterStories() throws Exception { driverProvider.end(); }