/** * Creates a new DefaultSelenium object and starts it using the specified baseUrl and browser string * @param url the baseUrl for your tests * @param browserString the browser to use, e.g. *firefox * @throws Exception */ public void setUp(String url, String browserString) throws Exception { stb.setUp(url, browserString); selenium = stb.selenium; }
/** Calls this.setUp(null) * @see #setUp(String) */ public void setUp() throws Exception { stb.setUp(); selenium = stb.selenium; }
/** * Calls this.setUp with the specified url and a default browser. On Windows, the default browser is *iexplore; otherwise, the default browser is *firefox. * @see #setUp(String, String) * @param url the baseUrl to use for your Selenium tests * @throws Exception * */ public void setUp(String url) throws Exception { stb.setUp(url); selenium = stb.selenium; }
/** Calls this.setUp(null) * @see #setUp(String) */ public void setUp() throws Exception { this.setUp(null); }
/** * Calls this.setUp with the specified url and a default browser. On Windows, the default browser is *iexplore; otherwise, the default browser is *firefox. * @see #setUp(String, String) * @param url the baseUrl to use for your Selenium tests * @throws Exception * */ public void setUp(String url) throws Exception { setUp(url, runtimeBrowserString()); }
/** * Creates a new DefaultSelenium object and starts it using the specified * baseUrl and browser string. The port is selected as follows: if the * server package's RemoteControlConfiguration class is on the classpath, * that class' default port is used. Otherwise, if the "server.port" system * property is specified, that is used - failing that, the default of 4444 * is used. * * @see #setUp(String, String, int) * @param url the baseUrl for your tests * @param browserString the browser to use, e.g. *firefox * @throws Exception */ public void setUp(String url, String browserString) throws Exception { setUp(url, browserString, getDefaultPort()); }
@BeforeTest @Override @Parameters({"selenium.url", "selenium.browser"}) public void setUp(@Optional String url, @Optional String browserString) throws Exception { if (browserString == null) browserString = runtimeBrowserString(); super.setUp(url, browserString); staticSelenium = selenium; };