Hi
I have written a code in JAVA(Eclipse) to test my application.
I am facing one wired issue.When I am executing the code on IE it is giving me error as "NoSuchElementFound" but if I run the same code on firefox it is working fine.
Error Msg:Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element with name: company
The most interesting thing is if I convert my java code to C#(.NET) then my code is working fine on IE.
Can any one please tell me why java code is not running on IE?
Details:
IE 8.0
Webdriver :InternetExplorer,Firefox
Code:
try
{
driver.get("
https://enterWebSite.com);Thread.sleep(10000);
WebDriver driver = new InternetExplorerDriver();
WebElement Company = driver.findElement(By.name("Company"));
Company.sendKeys(new String[] {"Abcd1234"});
}
catch(Exception e)
{
}
'Object details:
<input type="text" maxlength="20" tabindex="1" id="comp_id" accesskey="c" size="8" name="COMPANY" class="signon">
I am getting error for '
Company.sendKeys(new String[] {"Abcd1234"});'
Note : Same code is working fine with FF,so it means that all the required jar files are available with me. For IE I have imported IE webdriver.