18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Test Steps Not Executing for DOM Elements on IE and Safari When Run From Java
OS: Windows 7 - 64 bit
Sahi Version: 4.4 OS
IE9, non compatibility mode, with Chrome Frame
Safari 5.1.7
Java 1.7
Framework: FitNesse driving Sahi from a custom SahiTest fixture (Sahi & Java).
I have a set of tests that work fine on Chrome and Firefox, but they only execute partially on IE and Safari. The test is just a simple smoke test: it navigates to a webpage, clicks a link, enters some values into a couple of text fields, presses a submit button, and closes the browser. When run on any of the browsers, Sahi starts successfully, and successfully navigates to a page (since it navigates to the page successfully, I am guessing there is not any proxy issues). But, on IE and Safari, nothing happens after that. I tried to determine where the problem was, and it seemed the IE and Safari tests could do any commands that did not directly interact with DOM elements. For example, it could open the browser, navigate to the page, scan document.body for particular text, and close the browser. However, if there was a click() or a setValue() or an exists() or isVisible(), none of this would work on IE and Safari. There is something even more baffling. If I start my test, and then stop execution (from FitNesse), once the Sahi browser insance is open, I launch the Sahi controller. I then use CTRL+hover to locate the link or button. Once that is loaded into the controller, I press the click button, and the link is clicked successfully. So, it is obvious that Sahi is loading properly and that it has injected all the necessary stuff into the page.
Is there anything in IE and Safari that could be causing this behavior to act differently? The same exact stuff runs flawlessly on Chrome and Firefox. It is as if it is not able to access the dom elements at runtime. I even debugged this in Java, and when I get to the step that executes a click() or setValue(), it doesnt exception or anything. It just hangs as if it has gone down a black hole. Again, i do the same thing on Chrome and Firefox, and it works fine.
One thing to note is that, when running for IE and Safari, once it has successfully navigated to the page and it is hanging, the following just keep scrolling in the console:
INFO: getRequestingProtocol() = http
Jan 14, 2014 11:01:35 AM net.sf.sahi.config.SahiAuthenticator getPasswordAuthent
ication
INFO: realm=TeamCity; getRequestingScheme()=basic
Jan 14, 2014 11:01:35 AM net.sf.sahi.RemoteRequestProcessor process401
INFO: wwwAuthenticate: Basic realm="TeamCity"
Jan 14, 2014 11:01:35 AM net.sf.sahi.RemoteRequestProcessor process401
INFO: scheme=basic; realm=TeamCity
Jan 14, 2014 11:01:45 AM net.sf.sahi.config.SahiAuthenticator getPasswordAuthentication
Please help!
Brad
Sahi Version: 4.4 OS
IE9, non compatibility mode, with Chrome Frame
Safari 5.1.7
Java 1.7
Framework: FitNesse driving Sahi from a custom SahiTest fixture (Sahi & Java).
I have a set of tests that work fine on Chrome and Firefox, but they only execute partially on IE and Safari. The test is just a simple smoke test: it navigates to a webpage, clicks a link, enters some values into a couple of text fields, presses a submit button, and closes the browser. When run on any of the browsers, Sahi starts successfully, and successfully navigates to a page (since it navigates to the page successfully, I am guessing there is not any proxy issues). But, on IE and Safari, nothing happens after that. I tried to determine where the problem was, and it seemed the IE and Safari tests could do any commands that did not directly interact with DOM elements. For example, it could open the browser, navigate to the page, scan document.body for particular text, and close the browser. However, if there was a click() or a setValue() or an exists() or isVisible(), none of this would work on IE and Safari. There is something even more baffling. If I start my test, and then stop execution (from FitNesse), once the Sahi browser insance is open, I launch the Sahi controller. I then use CTRL+hover to locate the link or button. Once that is loaded into the controller, I press the click button, and the link is clicked successfully. So, it is obvious that Sahi is loading properly and that it has injected all the necessary stuff into the page.
Is there anything in IE and Safari that could be causing this behavior to act differently? The same exact stuff runs flawlessly on Chrome and Firefox. It is as if it is not able to access the dom elements at runtime. I even debugged this in Java, and when I get to the step that executes a click() or setValue(), it doesnt exception or anything. It just hangs as if it has gone down a black hole. Again, i do the same thing on Chrome and Firefox, and it works fine.
One thing to note is that, when running for IE and Safari, once it has successfully navigated to the page and it is hanging, the following just keep scrolling in the console:
INFO: getRequestingProtocol() = http
Jan 14, 2014 11:01:35 AM net.sf.sahi.config.SahiAuthenticator getPasswordAuthent
ication
INFO: realm=TeamCity; getRequestingScheme()=basic
Jan 14, 2014 11:01:35 AM net.sf.sahi.RemoteRequestProcessor process401
INFO: wwwAuthenticate: Basic realm="TeamCity"
Jan 14, 2014 11:01:35 AM net.sf.sahi.RemoteRequestProcessor process401
INFO: scheme=basic; realm=TeamCity
Jan 14, 2014 11:01:45 AM net.sf.sahi.config.SahiAuthenticator getPasswordAuthentication
Please help!
Brad
Answers