Sahi can't get access to child iframe elements

741 Views Asked by At

I can't get access to child iframe content from twist. I was wondering, but such Sahi code don't executed correctly for me:

browser.execute("$('#buttonid', window.frames['iframeid'].document).click()");
browser.execute("window.frames['iframeid'].document.getElementById('buttonid').click()");

We used 2.4 version of Twist.

Can you tell me what I am doing wrong ?

1

There are 1 best solutions below

0
On

Sahi should automatically fetch all iframe's or frame's elements. In normal case browser.click(buttonid) should work. If its not working.

Can you please tell me is the frame or iframe is coming from different domain or its coming from the same domain.