18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

JavaClientTest fails in IE 9 with undefined: DOM Exception: NOT_SUPPOR

DwarFDwarF Members
edited March 2011 in Sahi - Open Source
Does anyone know how to deal with this in IE 9?

I followed the steps for the sample_java_project.
I've run it before successfully in <= IE 8.
I installed the lastest client download from sourceforge: sahi_20110314.zip
I changed one line of the testGoogle() method to show the new DOM Exception:
browser.link("Login").click(); //exists in test already
System.out.println(":: browser.textbox(\"req_username\").exists() = " + browser.textbox("req_username").exists()); //exists in test already
browser.textbox("req_username").setValue("TESTING"); //added to test - causes error

I recieve the following error.

error:_setValue(_textbox("req_username"), "TESTING")
undefined: DOM Exception: NOT_SUPPORTED_ERR (9)
No trace available
at net.sf.sahi.client.Browser.executeStep(Browser.java:223)
at net.sf.sahi.client.Browser.execute(Browser.java:190)
at net.sf.sahi.client.Browser.setValue(Browser.java:326)
at net.sf.sahi.client.ElementStub.setValue(ElementStub.java:173)
at in.co.sahi.JavaClientTest.testGoogle(JavaClientTest.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


The testSahiDemoSite() method works fine in IE 9 - even though it too is setting values in textboxes.

Comments

  • narayannarayan Administrators
    Hi DwarF,

    The next release should have this fix, but meanwhile,

    Open sahi/htdocs/spr/concat.js

    Search for

    if (window.document.createEvent)

    and replace it with

    if (!this._isIE())

    There should be 3 lines where this needs to be done: 707, 1007, 1037

    Restart Sahi, clear browser cache, and it should work fine.

    Regards,
    Narayan
  • DwarFDwarF Members
    Thanks Narayan, that worked. It was on lines 666, 955 and 992 for my concat.js
This discussion has been closed.