I m using a JSP page in which I'm inputting the a text field. Below u can see the code
<table>
<tr>
<td><input type="text" id="searchText" name="searchInput"/></td>
</tr>
</table>
Then I executed the test case which will verify the search input text.Below is the code
public class TestCaseExample extends SeleneseTestBase {
@Before
public void setup() {
WebDriver driver = new FirefoxDriver(new FirefoxBinary(new File(
"C:\\Program Files (x86)\\Mozilla Firefox 3.6\\firefox.exe")), new FirefoxProfile());
String baseUrl = "http://localhost:8080/RecipeProject/";
selenium = new WebDriverBackedSelenium(driver, baseUrl);
}
@Test
public void testCaseExample() {
verifyTrue(selenium.isElementPresent("searchText"));
selenium.type("searchText", "pepper");
}
}
The verifyTrue test return true. However, selenium.type test failed with this error: com.thoughtworks.selenium.SeleniumException: Element searchText not found
Please help in this matter.