Following your discussion I've tried the following test case based on
what was located by selenium ide, and I'm interested in your thoughts
about why the loginButton.click() method does not work:
@Test
public void testWebDriver()
{
WebDriver driver = new FirefoxDriver();
driver.navigate().to("http://localhost:8080");
WebElement userIdTextBox = driver.findElement(By.locator(
"//Window[ID=\"isc_Window_0\"]/item[0][Class=\"DynamicForm\"]/
item"
+ "[name=userId||title=userID||index=0||Class=TextItem]/
element"));
WebElement passwordTextBox = driver.findElement(By.locator(
"//Window[ID=\"isc_Window_0\"]/item[0][Class=\"DynamicForm\"]/
item"
+ "[name=password||title=password||index=1||Class=PasswordItem]/
element"));
WebElement loginButton = driver.findElement(By.locator(
"//Window[ID=\"isc_Window_0\"]/item[0][Class=\"DynamicForm\"]/
item"
+ "[name=loginButton||title=login||index=2||Class=ButtonItem]/
canvas"));
userIdTextBox.clear();
userIdTextBox.sendKeys("goodUsername");
passwordTextBox.clear();
passwordTextBox.sendKeys("goodPassword");
loginButton.click(); // doesn't work...
//loginButton.sendKeys(Keys.ENTER); doesn't work, either...
//loginButton.submit(); doesn't work, either...
driver.close();
driver.quit();
}
Cheers,
Wil