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.

Browser Script compatibility FF to IE9 & IE8

Akss004Akss004 Members
edited November -1 in Sahi - Open Source
Hi Dhiraj,
Please follow these steps:
Open sahi/htdocs/spr/concat.js
Search for
Sahi.prototype._isFF4 = function () {return /Firefox\/4|Iceweasel\/4|Shiretoko\/4/.test(this.navigator.userAgent);};
and Replace it with.
Sahi.prototype._isFF4 = function () {return /Firefox\/4|Iceweasel\/4|Shiretoko\/4|Firefox\/5|Iceweasel\/5|Shiretoko\/5/.test(this.navigator.userAgent);};
Restart Sahi, clear browser cache, and your problem should be fixed.

Regards
Sumitra
Join Sahi on Facebook: http://www.facebook.com/pages/Sahi/132288696813329

Tyto Software Pvt. Ltd. - Commercial support, Customization and Consulting around Sahi
support (at) sahi.co.in | sumitra (at) sahi.co.in

Hi sumitra,

I have recorded scripts with FF4 and its working fine with FF5 the latest version of Fire Fox. Sahi is not able to execute same script of Fire Fox on IE8 or IE9.


Do we have any such facility available for FF scripts to IE9 or IE8 compatibility issue?

Comments

  • SumitraSumitra Members
    Hi Akss004,

    The above changes should be make for FF5 only.

    Basically how Sahi works is: If you record the script on FF4, you can execute it on any of the other browser like IE8,IE9,Chrome and it works even vice versa.

    Could you let me know which version of sahi are you using?

    Also, are you getting any error message while executing the script or the result is failure?

    Let me know what exactly is happening ?

    Regards
    Sumitra
  • Akss004Akss004 Members
    Hi,

    I am using "Sahi 3.5 2011-05-25". Basically when i execute the scripts recorded in FF on IE8 or IE9 it refuse to identify few of the elements present in that Script which is recorded from the FireFox and also working on it.

    Then i have checked manually by using controller to identify those element on IE and it identify it as different element.

    For e.g. _submit("Cancel") on fire fox will identify on IE 8 and IE9 as _button("Cancel").

    I am not sure that either it is Sahi's issue or application we are using has that different implementation of IE and FF.


    So when i have read above post for script browser compatibility from IE to FF. I thought reverse also would be possible so just confirming it.

    Thanks for your quick reply... :)
  • SumitraSumitra Members
    Hi Akss004,

    When Sahi identifies the elements differently for IE then you can use _isIE() and _isFF() API.

    For eg:

    if(_isIE()){
    //statements
    }
    if(_isFF()){
    //statements
    }

    Regards
    Sumitra
  • Akss004Akss004 Members
    Yes.

    I was looking for the same kind of functionality so i don't need to handle it manually or with separate scripts for IE and FF.

    I think this API's are not listed on websites i have searched for it. May i know any place or Document where this kind of API's are listed so we can use it as reference.

    Thanks for your quick response once again.... cheers :)
  • SumitraSumitra Members
    Hi Akss004,

    Yes,these APIs are not listed on the website. We will be updating it as soon as possible.

    You can find these APIs on the Controller under APIs List.

    Regards
    Sumitra
  • Sahi Controller does not open for IE 9 Browser, can anyone help me out.
  • hey Amol,

    Can you provide some more details sahi version and steps are you following?

    Are you using secure connection with 'https' ?
  • I am using 3.5 and IE 9. Now sahi controller window open but doen not record anything
  • Hi Amol,

    Could you please delete IE browser cache and try again?

    Also,check if you are able to record on other browser.

    Regards
    Sumitra
  • arpitarpit Members
    Hi Sumitra,
    I am running test case in IE8 but its not working, it keeps showing the error:

    error:_sahi.setServerVarPlain('___lastValue___4e573866d13c1', _getText(_byXPath("//html")))
    Window/Domain not found: popupNameFromStep=; derivedName=; windowName=; windowTitle=Ticker; wasOpened=0;

    Please help me..Thanks.
  • Hi arpit,

    Please create a new forum post.

    Kindly look at this: http://sahi.co.in/forums/viewtopic.php?id=2433

    Which version of Sahi are you using and check if it works fine on other browsers.

    Also, let me know if you are using an https site?

    Regards
    Sumitra
  • arpitarpit Members
    Hi Sumitra,
    I am using Sahi 3.5v.
    Yes it is working fine for all other browsers (firefox, chrome and safari). The problem is occurring with IE8.
    And I am not using any https site.

    Sorry I posted here, next time i'll create a new forum post.

    Thanks again.
  • Hi arpit,

    Can you check if the XPath mentioned is the same for IE8.

    Regards
    Sumitra
Sign In or Register to comment.