Opened 3 years ago

Closed 23 months ago

#14123 closed defect (fixed)

DOH Robot iframe timing issue on IE8?

Reported by: jamesthomas Owned by: haysmark
Priority: high Milestone: 1.8
Component: TestFramework Version: 1.7.0b1
Keywords: Cc:
Blocked by: Blocking:

Description

I'm seeing a strange issue when using DOH on IE8 with DOH Robot. When the test harness is ran from a fresh restart of the browser (or a normal refresh when the browser cache has been cleared), we're getting the JavaScript error, "Object doesn't support this property or method". Opening up the debugger, I can see that the line 63 in dojo/robotx.js is causing the issue.

iframe.contentWindow.dojo.addOnLoad(function(){

doh.robot._run(robotFrame);

});

I've put in some console.logs & it appears that the iframe.contentWindow.dojo object doesn't have the "addOnLoad" function available at that time.

If I reload without flushing the browser cache, this error is almost always not encountered, which makes me believe it's a script load timing issue, based upon whether the scripts coming from the cache or over the network.

Wrapping the function call within a setTimeout(...., 0) handler fixes the issue for us.

Sorry I can't reproduce an example test case, as it's using internal-only project code, but we're the DOH pages are using lots of module dependencies.

Change History (2)

comment:1 Changed 3 years ago by bill

  • Owner set to haysmark

comment:2 Changed 23 months ago by haysmark

  • Resolution set to fixed
  • Status changed from new to closed

I think the AMD rewrite handles this gracefully now: it instead checks for require and loads dojo/ready.

Note: See TracTickets for help on using tickets.