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.

can not access anything on twitter

smitty1_2smitty1_2 Members
edited November -1 in Sahi - Open Source
OS: Win7, 64bit
Browser: Firefox 3.6.16
Sahi (Build: 2011-03-14)


Hi,

When I navigate to htt*://twitter.com the recording stops. Besides I can't access anything on the website by holding CTRL. It is not a https connection.
Basically I want to write a script that sends direct messages to my followers.
So how come I can't access anything?

Regards

Comments

  • narayannarayan Administrators
    twitter.com uses explicitly sets document.domain=twitter.com

    We need to do the same for making Sahi work.

    Open sahi/htdocs/spr/domainfix.js, and replace its contents with this:
    var d = window.document.domain;
    if (d){
        var ix = d.lastIndexOf(".");
        ix = d.lastIndexOf(".", ix-1);
        if (ix!=-1){
            document.domain = d.substring(ix+1);
        } else {
            document.domain = d;
        }
    }
    __sahiDebug__("domainfix.js: end");
    

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

    Regards,
    Narayan
  • Thank you narayan. It works. Wouldn't it be nice to have this by default in the next Sahi version?

    Regards
  • narayannarayan Administrators
    Yes and No.

    Hi smitty1_2,

    It is hard to detect if an application uses document.domain (at lease we have not figured it out yet.) But what we do need to do, is to make this configurable via a userdata configuration file, and not make you modify a javascript file. We will keep you posted on developments; do let us know if you have suggestions.

    Regards,
    Narayan
Sign In or Register to comment.