@Override public void stop() { selenium.stop(); }
@Override public void stop() { selenium.stop(); }
public void stop() { base.stop(); }
public void stop() { selenium.stop(); }
public void stop() { sel.stop(); }
/** checks for verification errors and stops the browser */ public void tearDown() throws Exception { try { checkForVerificationErrors(); } finally { if (selenium != null) { selenium.stop(); selenium = null; } } }
public class ...... { private static Selenium selenium; @BeforeClass public static void initSelenium() { selenium = new DefaultSelenium(...); // or initialize it in any other way } @Test public void testA {...} @Test pulic void testB {...} @AfterClass public static void closeBrowsers() throws Exception { selenium.stop(); } }
@AfterScenario public void afterScenario() throws Exception { selenium.close(); selenium.stop(); }
@AfterStory public void afterStory() throws Exception { selenium.close(); selenium.stop(); }
@AfterScenario public void afterScenario() throws Exception { selenium.close(); selenium.stop(); }
@AfterStories public void afterStories() throws Exception { selenium.close(); selenium.stop(); }
@AfterStories public void afterStories() throws Exception { selenium.close(); selenium.stop(); }
@AfterStory public void afterStory() throws Exception { selenium.close(); selenium.stop(); }
@BeforeClass @Parameters({"selenium.restartSession"}) public void getSelenium(@Optional("false") boolean restartSession) { selenium = staticSelenium; if (restartSession) { selenium.stop(); selenium.start(); } }
public void tearDown() throws Exception { sel.stop(); if (launchServer) server.stop(); }
public static void closeSeleniumSession() { LOGGER.info("Closing Selenese session: " + session()); if (null != session()) { session().stop(); resetSession(); } }
@AfterClass void stopServers() { serverA.stop(); serverB.stop(); selenium.stop(); }
Selenium selenium = new DefaultSelenium("localhost", 4444, "*firefox", BASE_URL); selenium.start(); selenium.open(BASE_URL); selenium.type("j_idt8:inputName", "Robot"); selenium.click("j_idt8:_t12"); selenium.waitForCondiditon("selenium.isElementPresent('j_idt17:input')", MAX_WAIT_TIME_IN_MS); selenium.type("j_idt17:input", "Selenium testing in proggress...."); selenium.click("j_idt17:_t20"); selenium.waitForCondiditon("selenium.isElementPresent('j_idt17:input')", MAX_WAIT_TIME_IN_MS); selenium.type("j_idt17:input", "Test over!"); selenium.click("j_idt17:_t20"); selenium.stop();
@Override public void run() { SeleniumWrapper remote = getRemote(); try { remote.getSelenium().stop(); markComplete(); } catch (Throwable e) { shell.getTopLogger().log(TreeLogger.WARN, "Error stopping selenium session at " + remote.getSpecifier(), e); setException(e); } } }
@Override public void run() { SeleniumWrapper remote = getRemote(); try { remote.getSelenium().stop(); markComplete(); } catch (Throwable e) { shell.getTopLogger().log(TreeLogger.WARN, "Error stopping selenium session at " + remote.getSpecifier(), e); setException(e); } } }