Recording inside IFrame fails (even after restart) #29

Open
peter64 opened this Issue Mar 19, 2010 · 3 comments

Comments

Projects
None yet
2 participants

peter64 commented Mar 19, 2010

  1. launch windmill from shell
    windmill shell ie http://www.wordstream.com/keywords
  2. Wait for page to finish loading then click on record
  3. Watch as it picks up interactions with content outside the IFrame but fails to pickup interactions with content in the IFrame.
Collaborator

admc commented Mar 19, 2010

Could you provide a little more information as to how this iframe is getting appended to the page? It looks like somehow it isn't getting proxied -- thus the recorder is unable to add listeners, or even access it in anyway due to the cross domain iframe security.

peter64 commented Mar 30, 2010

Sorry to take so long to follow up, here is the javascript that appears to be being used to populate and load the iframe.

In the main page

Loading...

In an accompanying JS file
document.domain = 'domain.com';
$(document).ready(function()
{
$('#embed_area').replaceWith('<iframe id="fkt_embed" frameborder="0" width="788" height="594"></iframe>');
});

$('#fkt_embed').ready(function()
{
tool_root = 'http://subdomain.domain.com'
input_embed = encodeURIComponent('Enter a keyword');
try
{
if (_fkt_root != undefined)
{
tool_root = _fkt_root;
}
} catch(err) {}
try
{
if (_fkt_input_embed != undefined)
{
input_embed = encodeURIComponent(_fkt_input_embed);
}
} catch(err) {}
var base_url = tool_root+'/?embedded=1&input_embed='+input_embed;
if (location.search.length>0)
{
base_url += '&'+location.search.substring(1);
}

//Enable cross-domain user tracking specifically for iFrame
var iframe = document.getElementById("fkt_embed");
iframe.src = pageTracker._getLinkerUrl(base_url); //Transfer visitor and campaign cookies from one domain to another
$('#fkt_embed').attr('src', iframe.src);

});

I think the parts you will be most interested in are

Loading...
$('#embed_area').replaceWith('<iframe id="fkt_embed" frameborder="0" width="788" height="594"></iframe>');
$('#fkt_embed').attr('src', iframe.src);
Collaborator

admc commented Apr 6, 2010

Alright yeah, so the fact that this is loading an absolute URL via JS into the iframe is not allowing the proxy to give this a compatible url, thus the explorer or recorder is breaking the javascript cross site security policy. You can re-write your app to use a relative URL.. or start the test at the URL of the iframe. If you can't get that working I believe your only option is a tool that runs stuff in the trusted space like watir.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment