Selenium webdriver is not working with Internet Explorer 9

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Selenium webdriver is not working with Internet Explorer 9

mfsi_sitamj
Hi All,

I have a selenium webdriver code written in Java which i want to execute in Internet Explorer 9.

My Code :-
--------------------------------------------------------------------------------------------------------------
DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();   ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
WebDriver wbdv = new InternetExplorerDriver(ieCapabilities);    
wbdv.get("http://www.google.co.in/");    
wbdv.findElement(By.xpath("//INPUT[@id='gbqfq']")).sendKeys("Selenium");

--------------------------------------------------------------------------------------------------------------

This code is working fine with Firefox and Chrome driver. But when i am trying this using IE driver, it only able to open the first page i.e. "http://www.google.co.in/" and then it is not able to do anything.

Error it is showing :- Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with xpath == //INPUT[@id='gbqfq'] (WARNING: The server did not provide any stacktrace information)

Thanks in advanced
Sitam
Reply | Threaded
Open this post in threaded view
|

Re: Selenium webdriver is not working with Internet Explorer 9

softwaretestingforum
Administrator
Could you introduce implicit wait like this and try -

WebDriver wbdv = new InternetExplorerDriver(ieCapabilities);    
wbdv.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);


~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Selenium webdriver is not working with Internet Explorer 9

mfsi_sitamj
Thanks tarunkumar for your reply. I have tried with the implicit wait but facing the same problem.

Regards
Sitam
Reply | Threaded
Open this post in threaded view
|

Re: Selenium webdriver is not working with Internet Explorer 9

softwaretestingforum
Administrator
Which version of Selenium are you using? Could you try with latest version which is 2.21.0?
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: Selenium webdriver is not working with Internet Explorer 9

mfsi_sitamj
Hi tarunkumar,

Thanks for the reply. I have tried with selenium 2.21.0 but it is still showing the same error.

Thanks
Sitam