Search code examples
flashwebdriverexternalinterfacewatir-webdriver

Not able to invoke ExternalInterface method of flash using (watir-)webdriver


I am trying to use automate a web + flash application. Our dev have provided me ExternInterface APIs, which we are able to invoke using Watire and IE. However same thing is now working on FF 3.6 and watir-webdriver/webdriver/firewatir. I am tending to assume that this is not a problem with either of the automation tool, but FF itself. However other part of our product uses js to invoke other APIs and they are working fine. So I am not able to zero in on browser or automation tool.

Any hints?

Thanks for the help.

-Manish


Solution

  • This probably is because of the way you are embedding your swf on your webpage.

    FF/Chrome use <object> tags whereas IE uses <embed> tags.

    This is probably where you have missed out.

    You should use SWFObject for embedding your swf and handling this kind of cross-browser embedding problems for you.

    Oh, and dont forget to flag allowScriptAccess to true.

    Cheers