public PersistentTestContext() throws Exception { this.executor = new XWikiExecutor(0); executor.start(); // Use a wrapping driver to display more information when there are failures. this.driver = new XWikiWrappingDriver(new FirefoxDriver(), getUtil()); // Wait when trying to find elements on the page till the timeout expires getUtil().setDriverImplicitWait(this.driver); }
public PersistentTestContext() throws Exception { this.executor = new XWikiExecutor(0); executor.start(); // Ensure that we display page source information if a UI element fails to be found, for easier // debugging. this.driver = new FirefoxDriver() { @Override public WebElement findElement(By by) { try { return super.findElement(by); } catch (NoSuchElementException e) { throw new NoSuchElementException( "Failed to locate element from page source [" + getPageSource() + "]", e); } } }; }
public void shutdown() throws Exception { driver.close(); executor.stop(); }