No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Webdriver IE click doesn't seem to work


    I'm evaluating the use of Selenium Webdriver for the testing of SmartGWT.
    Firefox and Chrome work fine for me but I can't get Internet Explorer to work with SmartGWT. More specifically I can't get it to click on SmartGWT elements.

    I've followed the Installation and Setup process as described on the IE Webdriver project page.
    I've tried the click on different SmartGWT elements, including regular buttons.
    I've confirmed that the same setup can click on a Button on a non SmartGWT website, so I suspect it's not a general Webdriver issue.

    Here's a setup which should reproduce the problem:
    The SmartGWT Showcase:
    v10.0p_2015-04-01/LGPL Development Only (built 2015-04-01)

    isomorphic_webdriver.jar from the nightly build:

    Internet Explorer 11:
    Version: 11.0.9600.17690
    Updateversion: 11.0.17 (KB3032359)

    The testcase (supposed to click on "Grids" Checkbox):

    //I've also tried adding IEDriverServer.exe to Path:
    System.setProperty("", "E:\\Testing\\Tools\\IE_Driver\\IEDriverServer.exe");
    SmartClientWebDriver driver = new SmartClientIEDriver();
    //scLocator captured with Selenium IDE
    String scLocCheckbox="scLocator=//VLayout[ID=\"isc_Showcase_1_0\"]/member[Class=VLayout||index=0||length=1||classIndex=0||classLength=1]/member[Class=HLayout||index=0||length=2||classIndex=0||classLength=1]/member[Class=SplitPane||index=0||length=2||classIndex=0||classLength=1]/rightLayout/member[Class=TabSet||index=0||length=1||classIndex=0||classLength=1]/tabPane[title=Home%26nbsp%3B%26nbsp%3B||ID=main_tab||index=0]/member[Class=VLayout||index=0||length=1||classIndex=0||classLength=1]/member[Class=DynamicForm||index=0||length=2||classIndex=0||classLength=1]/item[name=gridsCB||title=Grids||value=true||index=17||Class=CheckboxItem]/valueicon";
    driver.get("http://localhost:8080/showcase/#main"); //your showcase URL;
    Best regards,

    Your sample code works for us.

    Windows 7 SP1 x64,
    IE11 version 11.0.9600.17691
    Update Versions: 11.0.17 (KB3032359)
    IEDriverServer x64 2.45.0

    What OS are you running?
    What version of the IEDriver do you have installed (including x86 vs. x64)?
    Does it work if you use a URL pointing to our public showcase - i.e.


      Hello all,

      I noticed version differences here. Is it OK to mix the 5.0p sample with 5.1d libs?

      Best regards,


        No, it's not recommended, but in this case it didn't seem to be the source of the problem since it worked fine (for us) that way.


          Thanks for trying it on your end.

          Here are my specs again, with OS and IEDriver Version:

          Windows 8.1 x64
          IE11 version 11.0.9600.17690
          Update Versions: 11.0.17 (KB3032359)
          IEDriverServer x64 2.45.0

          I've tried it with your showcase "" and it didn't work for me either.

          I should also add that the testcase I provided lacks a assertion at the end that would check that the "Grids" checkbox is selected. It doesn't throw an error, it's just that the checkbox isn't selected as expected. I did try making an assertion, but it didn't work out as expected either, so right now one has to manually veryfy if the Checkbox was clicked or not. In my case the checkbox is not clicked.


            We are able to reproduce the problem in Windows 8.1, but this appears to be a problem with how Selenium interacts with IE11 in Windows 8.1, and not something introduced by our layer of code.

            Specifically, trying to execute JavaScript on IE throws a JavaScript error.

            Do you receive an exception in Eclipse (or wherever you're running your sample)? We receive:

            Exception in thread "main" org.openqa.selenium.WebDriverException: JavaScript error (WARNING: The server did not provid\
            e any stacktrace information)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                at java.lang.reflect.Constructor.newInstance(Unknown Source)
                at org.openqa.selenium.remote.ErrorHandler.createThrowable(
                at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
                at org.openqa.selenium.remote.RemoteWebDriver.execute(
                at org.openqa.selenium.remote.RemoteWebDriver.executeScript(
                at Test.main(
            When you said that you were able to run WebDriver on IE11 against non-Isomorphic pages, did you attempt to execute JS?

            You might wish to follow the discussion here:


              I don't receive an exception in Eclipse when I run Javascript or use (which as I understand uses Javascript internally) on the SmartGWT showcase, it just doesn't seem to work. Equally the Webdriver way of clicking "driver.findElement().click()" doesn't work for me on the showcase either and it supposedly uses browser native events instead of Javascript if I remember correctly.

              I did try a non SmartGWT website again and I get Javascript exceptions whenever I use the SmartClientWebDriver "" for example, but not when I run Javascript directly or use the Webdriver way of clicking.

              Example test:

              	public void javascriptTest() throws InterruptedException {
              		SmartClientWebDriver driver = new SmartClientIEDriver();
              		driver.findElement("btnI")).click(); //works for me
              		driver.assertEval("document.getElementsByName('btnI').item(0).click(); return true;", true); //works for me  
              		boolean pageReady = false;
              		while (!pageReady) {
              			pageReady = driver.assertEval("return document.readyState == \"complete\"", true); //works for me
      "btnI")); //exception is thrown

              Here is the exception I receive when I use on google

              org.openqa.selenium.WebDriverException: JavaScript error (WARNING: The server did not provide any stacktrace information)
              Command duration or timeout: 111 milliseconds
              Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
              System info: host: 'asc26', ip: '', 'Windows 8.1', os.arch: 'x86', os.version: '6.3', java.version: '1.8.0_20'
              Driver info:
              Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:19670/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
              Session ID: 802f99c4-5415-40d6-8b0a-527539132e69
              	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              	at sun.reflect.NativeConstructorAccessorImpl.newInstance(
              	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
              	at java.lang.reflect.Constructor.newInstance(
              	at org.openqa.selenium.remote.ErrorHandler.createThrowable(
              	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
              	at org.openqa.selenium.remote.RemoteWebDriver.execute(
              	at org.openqa.selenium.remote.RemoteWebDriver.executeScript(
              	at webtesting.IETest.javascriptTest(
              	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              	at sun.reflect.NativeMethodAccessorImpl.invoke(
              	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
              	at java.lang.reflect.Method.invoke(
              	at org.testng.internal.MethodInvocationHelper.invokeMethod(
              	at org.testng.internal.Invoker.invokeMethod(
              	at org.testng.internal.Invoker.invokeTestMethod(
              	at org.testng.internal.Invoker.invokeTestMethods(
              	at org.testng.internal.TestMethodWorker.invokeTestMethods(
              	at org.testng.TestRunner.privateRun(
              	at org.testng.SuiteRunner.runTest(
              	at org.testng.SuiteRunner.runSequentially(
              	at org.testng.SuiteRunner.privateRun(
              	at org.testng.SuiteRunnerWorker.runSuite(
              	at org.testng.TestNG.runSuitesSequentially(
              	at org.testng.TestNG.runSuitesLocally(
              	at org.testng.remote.RemoteTestNG.initAndRun(
              	at org.testng.remote.RemoteTestNG.main(


                The problem may be related to native events in IE11 in this case. Does turning off native events work for you? It can be achieved by creating SmartClientWebDriver as follows:
                    DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
                    SmartClientWebDriver driver = new SmartClientIEDriver(caps);


                  Yes, this worked for me. Thanks for the help!
                  Do I have to expect that my tests or smartGWT will behave differently in any way, if I run IE without native events, while Chrome and FireFox with native events?


                    Native events are recommended over synthetic events because they simulate user interactions "better," so there might be some difference when IE is driven this way - but we're not aware of any specific limitation. You can look at for an overview of native events, though the browser table is likely out of date. You can let us know of any specific issues with this approach, but there's no guarantee they can be solved in our code layers.

                    This appears to be an issue with WebDriver not being able to use native events in IE11 in Windows 8.1 (no issue in Windows 7 SP1), and thus is not within Isomorphic's control - it's an issue that Selenium must work out with Microsoft. You can see a discussion of this issue here:

                    Note also that in our docs we still recommend Selenium V1.0 over WebDriver:


                      Thanks for the input, this really helps a lot.
                      The Issue 4403 seems to be indeed the one I have. Another workaround than to disable the native events was suggested in that discussion:
                      caps.setCapability("requireWindowFocus", true);
                      This also works for me (with the side-effect that Webdriver now moves the mouse cursor).

                      I've noticed your recommendation to use Selenium 1.
                      Most of the reasons against Webdriver in your documentation are not an issue for me or my colleagues (Apart from the browser compatibility problems, as has become painfully obvious by this issue). On the other hand I found the Webdriver API easier to work with, despite it's quirks, so Im hoping to make it work. My evaluation results so far look mostly positive (after having found solutions for several other weird problems) the Internet Explorer issue was somewhat of a bad surprise though. Thanks again for helping me find several workable solutions.