0

I test safari browser on Windows with Selenium Webdriver, when in debug mode, my script works well, but when I run it, it could not work well. Does anyone encounter this situation?

public class JustForTestSafari {

    public WebDriver driver;

    @Test
    public void f() {
        driver = new SafariDriver();

        String baseURL = "http://universitytest.emersonprocess.com/";
        String expectedTitle = "ProcessWorld - Your Connection to Global Information";
        WebDriverWait wait = new WebDriverWait(driver, 30);

        driver.get(baseURL);
        driver.manage().window().maximize();

        String actulTitle = driver.getTitle();
        Assert.assertEquals(expectedTitle, actulTitle);

        driver.findElement(By.id("_ctl0_mastercontent_username")).clear();
         driver.findElement(By.id("_ctl0_mastercontent_username")).sendKeys("***.guo");
        driver.findElement(By.id("_ctl0_mastercontent_password")).clear();
        driver.findElement(By.id("_ctl0_mastercontent_password")).sendKeys("*******");
        driver.findElement(By.id("_ctl0_mastercontent_btn_standardsignin")).click();
}
ham-sandwich
  • 3,975
  • 10
  • 34
  • 46
Alex Bruce
  • 533
  • 2
  • 10
  • 23
  • What programming language you using? and **what you mean by it could not work well?** any specific error? – Helping Hands Dec 18 '15 at 06:10
  • The programming language is JAVA, there is no any error, it just hanging there, no error, no action – Alex Bruce Dec 18 '15 at 06:20
  • Hey Alex, it won't hang for infinite amount of time, It will timeout after sometime, once it times out, it will throw an exception, can we have the exception trace. – Paras Dec 18 '15 at 09:59

0 Answers0