@Override public void sendKeys(CharSequence... keysToSend) { try { logger.debug("sending keys " +Arrays.toString(keysToSend)); element.sendKeys(keysToSend); } catch (WebDriverException e) { e.printStackTrace(); } }
private void stopPeerConnectionStats(String jsFunction, String peerConnectionId) { try { log.debug("kurentoTest." + jsFunction + "('" + peerConnectionId + "');"); browser.executeScript("kurentoTest." + jsFunction + "('" + peerConnectionId + "');"); } catch (WebDriverException we) { we.printStackTrace(); // If client is not ready to gather rtc statistics, we just log it // as warning (it is not an error itself) log.warn("Client does not support RTC statistics (function kurentoTest.{}() not defined)"); } }
@Override public void submit() { try { element.submit(); } catch (WebDriverException e) { e.printStackTrace(); } }
@Override public void clear() { try { logger.debug("clear text"); element.clear(); } catch (WebDriverException e) { e.printStackTrace(); } }
private void activatePeerConnectionStats(String jsFunction, String peerConnectionId) { try { browser.executeScript("kurentoTest." + jsFunction + "('" + peerConnectionId + "');"); } catch (WebDriverException we) { we.printStackTrace(); // If client is not ready to gather rtc statistics, we just log it // as warning (it is not an error itself) log.warn("Client does not support RTC statistics (function kurentoTest.{}() not defined)", jsFunction); } }
private void stopPeerConnectionStats(String jsFunction, String peerConnectionId) { try { log.debug("kurentoTest." + jsFunction + "('" + peerConnectionId + "');"); browser.executeScript("kurentoTest." + jsFunction + "('" + peerConnectionId + "');"); } catch (WebDriverException we) { we.printStackTrace(); // If client is not ready to gather rtc statistics, we just log it // as warning (it is not an error itself) log.warn("Client does not support RTC statistics (function kurentoTest.{}() not defined)"); } }
private void activatePeerConnectionStats(String jsFunction, String peerConnectionId) { try { browser.executeScript("kurentoTest." + jsFunction + "('" + peerConnectionId + "');"); } catch (WebDriverException we) { we.printStackTrace(); // If client is not ready to gather rtc statistics, we just log it // as warning (it is not an error itself) log.warn("Client does not support RTC statistics (function kurentoTest.{}() not defined)", jsFunction); } }
@Override public void cleanUp() { try { if (driver != null) { try { driver.quit(); } catch (WebDriverException ex) { ex.printStackTrace(); } driver = null; } } catch (Exception e) { e.printStackTrace(); } }
public static void cleanUp() { IWebDriverFactory iWebDriverFactory = getWebUIDriver().webDriverBuilder; if (iWebDriverFactory != null) { iWebDriverFactory.cleanUp(); } else { WebDriver driver = driverSession.get(); if (driver != null) { try { driver.quit(); } catch (WebDriverException ex) { ex.printStackTrace(); } driver = null; } } driverSession.remove(); uxDriverSession.remove(); }
log.debug("finally the load is loading with completed status is:" + loaded); } catch (org.openqa.selenium.WebDriverException e) { e.printStackTrace();
} catch (WebDriverException e) { e.printStackTrace();
log.debug("finally the load is loading with completed status is:" + loaded); } catch (org.openqa.selenium.WebDriverException e) { e.printStackTrace();
@BeforeScenario public void emptyCart() { try { webDriverProvider.get().manage().deleteCookieNamed("uaid"); } catch (WebDriverException e) { e.printStackTrace(); } } }
@Override public void evaluate() throws Throwable { try { String browser = System.getenv("BROWSER"); if(browser == null || browser.equals("firefox")) { //https://github.com/mozilla/geckodriver/issues/1151 //https://bugzilla.mozilla.org/show_bug.cgi?id=1264259 //https://bugzilla.mozilla.org/show_bug.cgi?id=1434872 d.navigate().to("about:mozilla"); Alert alert = ExpectedConditions.alertIsPresent().apply(d); if (alert != null) { alert.accept(); d.navigate().refresh(); } } d.quit(); } catch (UnreachableBrowserException | NoSuchSessionException ex) { System.err.println("Browser died already"); ex.printStackTrace(); } }
} catch (WebDriverException e) { LOGGER.error("Unable to capture screenshot due to the WebDriverException!", e); e.printStackTrace(); } catch (Exception e) { LOGGER.error("Unable to capture screenshot due to the Exception!", e);