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.
When should I modify "domainfix.js"
There is a file "sahi\htdocs\spr\domainfix.js"
which has a commented line :
//document.domain = d.substring(ix+1)
Anybod have any clue, when should I uncomment this line ??
I came across something about that but didnt really get it... :-(
Thank you for your help !
which has a commented line :
//document.domain = d.substring(ix+1)
Anybod have any clue, when should I uncomment this line ??
I came across something about that but didnt really get it... :-(
Thank you for your help !
Comments
But if Page A and Page B are both from the same domain but from different subdomains, then Sahi can handle it, if we uncomment that line in domainfix.js. Eg. A page from abc.example.com embedding a page from xyz.example.com.
Basically browser security mechanisms prevent javascript in a page from one domain access a page from another domain. But if they are from the same domain but different subdomains, such access is allowed, if they set their document.domain to the base domain.
cause any problems when there is only one domain? In that case,
we could have it uncommented as a catch-all.
Unfortunately for me , some of the pages that I need to automate
embed pages from other URLs...and it seems there is no workaround
for this (understandably)...
For example, some websites have googleadservices.com in an iframe, displaying ads. You can add
.*googleadservices.*
to sahi/config/exclude_inject.txt and these will not interfere with record or playback.
Even otherwise, Sahi can work with such pages, but it will need some tweaking. If needed I can try and help you automate it.