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.

Sahi Scripts not working for IE8

niteshsniteshs Members
edited November -1 in Sahi - Open Source
OS Name: MS Windows XP Professional, Version 2002 Service Pack 3
Browser Name & Version:
Sahi Build: 3.5


ISSUE:
=====
Sahi scripts are not running for Internet Explorer 8/9. They are working fine on firefox 12 & safari.

Note: My scripts contain Sahi JAVA API code.

DEBUGGING
=========

Here is the code I'm running via eclipse:

String sahiBase = "C:\\sahi"; // where Sahi is installed or unzipped
      String userDataDirectory = "C:\\sahi\\userdata"; //path to the userdata directory
      Configuration.initJava(sahiBase, userDataDirectory); // Sets up configuration for proxy. Sets Controller to java mode.

      String browserPath = "C:\\Program Files\\Internet Explorer\\iexplore.exe";
      String browserProcessName = "iexplore.exe";
      String browserOption = "-noframemerging -extoff";

Browser browser = new Browser(browserPath, browserProcessName, browserOption);    
      browser.open();

      browser.navigateTo("http://172.16.25.44/callcenter");
      
      browser.textbox("userid").setValue("ca2106");
      browser.password("password").setValue("mtllab");
      
      browser.cell("Sign In").click();
      browser.link("Settings").click();


ERROR
======
Exception in thread "main" error:_click(_link("Settings"))
Window/Domain not found:  popupNameFromStep=; derivedName=; windowName=myFrame; windowTitle=Download Java for Windows Internet Explorer; wasOpened=0; domain=java.com
    at net.sf.sahi.client.Browser.executeStep(Browser.java:205)
    at net.sf.sahi.client.Browser.execute(Browser.java:172)
    at net.sf.sahi.client.Browser.click(Browser.java:308)
    at net.sf.sahi.client.ElementStub.click(ElementStub.java:66)
    at Native_Code.main(Native_Code.java:61)


Why are we getting this type of error? The error hints to download java for IE but when I try to do it from JAVA official site, it throws "download corrupt file".

Kindly let me know how can I make it work for IE?

Thanks,
Nitesh

Comments

  • Hi Narayan,

    Any idea why is this happening?
  • zwdhdzwdhd Members
    sahi deals with popup window differently in different browsers.
  • had a similar problem with Javascript in IE 8 on my machine. our website uses jquery and when i logged into the website i did not click on the option initially that said SHOW ALL CONTENT at the bottom.

    BTW i'm using Sahi OS for now.

    as soon as i chose show all content after initially loading the website then my jquery controls started working for the most part.

    still having some issues with certain jquery controls not invoking but ill make another new thread on that.
  • Does anyone know how to deal with "show content" info message at the bottom? Each time sahi loads the page it shows this message. We need to manually click on this for Ajax and javascript to be enabled. if we do not click on 'show content' the script fails.
  • SCKSCK Members
    Hi Keats,

    You can stop the prompt from appearing by tweaking the browser settings.

    Internet Options - Security - Internet Zone - Custom Level - Miscellaneous - Display mixed content - select 'enable'

    Hope this helps, thanks!
Sign In or Register to comment.