forms - IEWebdriver: Cannot click on option element. Executing JavaScript click function returned an unexpected error -


I'm testing a web page with a large number of forms, the main form of the page and two sub-forms are specific sub -Forms are provided only when specific values ​​are selected in the main value. Recently, the page was rebuilt, thus sub-forms are not visible in the static page source. They are presented inclined and dynamically (most likely by java script, though not sure).

Below is a code sample from my tests that work on Firefox and Chrome but fails on IE

  if {println (keyTypeInput.isDisplayed ()) (keyType. IsEmpty ()!); Select key type selected = new selection (keytype input); KeyTypeSelector.selectByVisibleText (KeyType); }  

Note: keyTypeInput is WebElement. keyTypeInput.isDisplayed () show the truth, but no call selectByIndex of keyTypeSelector, selectByVisibleText etc. throws the following error:

2014-07-31 21: 23: 34,119 [pool-3-thread - 1] Information caqctCustomTestListener Log - Log Listener: Folder = com.qa.devportal.tests.regression.RunAQuery; Browser = INTERNET_EXPLORER10; Test = verifyResponse; Result = failure; TESTHOST = Local; Sessionid = 4a6cb35b-b0ef-4681-a6ea-64eaac64520c; SCREENSHOT = Can not save screenshot ;; ERROR = org.openqa.selenium.WebDriverException: Can not click on option element Javascript execution executes an unexpected error, but no error can be returned from the JavaScript engine of Internet Explorer. Version: '2.41.0', Modified: '3192d8a6c4449dc285928ba024779344f5423c58', Time: '2014-03-27 11:29:39' (Warning: the server did not provide any stacketress information) Command period or expired: 110 millisecond info Build System Information: Host: 'Battle LPT- pstepn', IP: '10.138.1.72 ', os.name:' Windows 7 ', os.arch:' amd64 ', os.version:' 6.1 ', java.version: '1.7.0_45' session ID: 4a6cb35b-b0ef-4681-a6ea-64eaac64520c driver information: org.openqa.selenium.ie.InternetExplorerDriver capabilities [{platform = Windows, javascriptEnabled = true, elementScrollBehavior = 0, ignore Jhumseting = False, s CapableScoreHower = true, ie.ensureCleanSession = false, Browser name = Internet Explorer, Enable ElementCacheCleanup = true, Unexpected AlertBehavior = Dismiss, Version = 10, ie.usePerProcessProxy = false, cssSelectorsEnabled = true, unseen ProtectedModeSettings = false, WindowFocus = false, handlesAletters Sun.reflect.NativeConstructorAccessorImpl on sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Basic Method) at = true, initialBrowserUrl = http, Ie.forceCreateProcessApi = false, countryIvents = true, browserAutTimeout = 0, ie.browserCommandLineSwitches =, sunscreenshot = true}] Kneinstans (Ntivekanstrctorksesrimplkjawa:57) Sunkriflektkdelgatingconstrictorksesrimplkneinstans () Delegtingkanstrctorksesrimplkjawa:45) Jawaklangkriflektkkyon structor.newInstance (Constructor.java:526) on org.openqa.selenium.remote.ErrorHandler.createThrowable (ErrorHandler.java:193) on Org.openqa.selenium.remote.RemoteWebElement.execute on org.openqa.selenium.remote (Remote WebElement.java, 2002). On org.openqa.selenium.remote.RemoteWebElement.click org.openqa.selenium.support.ui.Select.setSelected (Select.java:318) (RemoteWebElement.java:79) on org.openqa.selenium.support.ui. In Select.select ByIndex (Select.java:175) com.qa.devportal.pages.ApiExplorerPage.apiRequestParamsFill (ApiExplorerPage.java:290) com.qa.devportal.tests.regression.RunAQuery.verifyResponse (RunAQuery.java:95) .reflect.NativeMethodAccessorImpl.invoke0 on Sun (Native method) SunkreflectkNativeMethodAccessorImplkinvoke (NativeMethodAccessorImplkjava:57) to (SunkreflectkDelegatingMethodAccessorImplkinvoke on java.lang.reflect.Method.invoke DelegatingMethodAccessorImpl.java : 43) on org.testng.internal.Invoker.invokeMethod (Invoker.java:714) on org.testng.internal.MethodInvocationHelper.invokeMethod (MethodInvocationHelper.java:84) to (Method.java:606) org.testng.internal On .voker invokeTestMethod org.testng.internal.Invoker.invokeTestMethods (Invoker.java:1231) to (Invoker.java:901) on org.testng.internal.TestMethodWorker.invokeTestMethods (TestMethodWorker.java:127) on org.testng.internal.TestMethodWorker .run on Java.util.c (TestMethodWorker.java:111) oncurrent.ThreadPoolExecutor.runWorker java.util.concurrent.ThreadPoolExecutor $ Worker.run (ThreadPoolExecutor.java:615) at java.lang.Thread.run (ThreadPoolExecutor. Java: 1145) (Thread.java:744)

Do you have similar problems?


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -