java - NoSuchElementException is occurred during implementation of InternetExplorerDriver in Selenium WebDriver -
Currently, I'm working on WebDriver to invite IE browser to run the trial. But I tried to get a However, if I used a Chrome driver or a firefox driver, the code works fine. Any thoughts or thoughts will be appreciated Jar:. code: Error message: (post on "RemoteWebDriver.java189") ( NoSuchElementException when trying to run a simple example below.
selenium-server- standalone-2.5.0.jar
import org.openqa.selenium.By; Import org.openqa.selenium.WebDriver; Import org.openqa.selenium.ie.InternetExplorerDriver; Import org.openqa.selenium.remote.DesiredCapabilities; Public static zero principal (string [] args throws interrupted expeditions {Desirable capabilities ie capabilities = the desired capabilities Internet Explorer (); IeCapabilities.setCapability (InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); WebDriver Driver = New Internet Explorer Driver (ICAPPT); Driver.get ("www.google.com"); Driver.findElement (By.name ("q")); }
thread "main" org.openqa.selenium.NoSuchElementException exception: Unable to find an element with the name == q ( Warning: the server did not provide any stacktrack information) For documentation on this error, please see: http://seleniumhq.org/exceptions/no_such_element.html Info Build: Version: '2.5.0', Revision: '13516' , 'Time:' 2011-08-23 18:29:57 'System Info: Dew Name:' Windows 7 ', OSArt:' X86 ', Oversworth:' 6.1 ', Java Version:' 1.6.0_25 'Driver Info: Driver. Version: sun.reflect.NativeConstructorAccessorImpl.newInstance0 (sun.reflect.NativeConstructorAccessorImpl.newInstance) on sun.reflect.DellegatingConstructorAccessorImpl.newInstance (unknown source) at java.lang.reflect .Constructor.newInstance (unknown source on) org.openqa.selenium.remote.ErrorHandler.createThrowable (ErrorHandler.java:131) (ErrorHandler.java:105) on org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed or G.openqa.selenium.remote.RemoteWebDriver .execute (remote WebDriver.java:409) on org.openqa.selenium.remote.RemoteWebDriver.findElement (RemoteWebDriver.java:197) on org.openqa.selenium.remote.RemoteWebDriver.findElementByName lib (RemoteWebDriver.java:246). org.openqa.selenium.By on WebDriver2.main $ ByName.findElement (By.java:298) org.openqa.selenium.remote.RemoteWebDriver.findElemen
Comments
Post a Comment