import java.util.*; import junit.framework.TestCase; import com.thoughtworks.selenium.DefaultSelenium; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; public class mainTest extends TestCase { public Authorize authorize; private static final String PATH_CONFIG=".\\src\\script\\"; private Properties properties; private Selenium selenium; public Selenium getSelenium(){ return this.selenium; } public void setUp() { properties = new Properties(); File configfile = new File(PATH_CONFIG,"script.properties"); try { properties.load(new FileInputStream(configfile)); } catch (Exception e) { System.out.println("ERROR!!!"); } selenium = new DefaultSelenium( properties.getProperty("host"), Integer.valueOf(properties.getProperty("port")), properties.getProperty("browser"), properties.getProperty("domain")); selenium.start(); } public void test_CheckMainPage() throws Exception { selenium.open(properties.getProperty("domain")); try{ selenium.waitForPageToLoad("10000"); } catch (SeleniumException e) { Thread.sleep(6000); } ... }