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.
Null return from document object in different domain
Hi,
We want to test the website (https://apps.facebook.com/ourApp) iframe with a different domain. I notice that when i use the following code:
_domain("our_product_domain.com").document.getElementById("iframe_canvas").contentDocument.documentElement.innerHTML
i getting a error message: TypeError: Cannot read property "documentElement" from undefined
I try to _alert(_domain("our_product_domain.com").document.getElementById("iframe_canvas").contentDocument), this will return a null
Any solution to this issue? How i can access the element inside the iframe with different domain?
PS: i've added the domainfix.txt with *.facebook.com facebook.com
We want to test the website (https://apps.facebook.com/ourApp) iframe with a different domain. I notice that when i use the following code:
_domain("our_product_domain.com").document.getElementById("iframe_canvas").contentDocument.documentElement.innerHTML
i getting a error message: TypeError: Cannot read property "documentElement" from undefined
I try to _alert(_domain("our_product_domain.com").document.getElementById("iframe_canvas").contentDocument), this will return a null
Any solution to this issue? How i can access the element inside the iframe with different domain?
PS: i've added the domainfix.txt with *.facebook.com facebook.com