Selenium脚本在调试模式下工作,但不在运行模式下运行

时间:2017-06-06 16:34:33

标签: selenium

public void setUp() throws Exception {
    System.setProperty("webdriver.gecko.driver", "C:\\QA INSTALL\\geckodriver.exe");
    driver = new FirefoxDriver();
    baseUrl = "http://192.168.103.129:8080/";
    driver.manage().timeouts().implicitlyWait(100, TimeUnit.SECONDS);
}

@Test
public void testIBS651() throws Exception {
    driver.get(baseUrl + "/internetbanking/index.form");
    // ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=IBSEnvironmentName | ]]
new Select(driver.findElement(By.id("environment_name"))).selectByVisibleText("DEV");
// ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=IBSEnvironmentName | ]]
new Select(driver.findElement(By.id("environment_name"))).selectByVisibleText("QA");
// ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=IBSEnvironmentName | ]]
new Select(driver.findElement(By.id("country_code"))).selectByVisibleText("Australia");
// ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=IBSEnvironmentName | ]]
driver.findElement(By.id("submit_button")).click();
// ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=IBSEnvironmentName | ]]
new Select(driver.findElement(By.id("selectbank"))).selectByVisibleText("Queensland Teachers Credit Union");
// ERROR: Caught exception [ERROR: Unsupported command [selectWindow | name=IBSEnvironmentName | ]]

    driver.findElement(By.xpath("//html//body//section//div//div[2]//form//fieldset[2]//div/input")).click();
}

0 个答案:

没有答案