none
Internet Explorer Frames and UI Automation

    Pregunta

  • Whazzup

    I'm having an issue with UI Automation reading the HTML inside frames in Internet Explorer versions 6 and 7. It just won't do it.

    So this is how it is: I need to automate a web page that has one inline frame (IFrame) in it. I can access everything in the HTML on the main page using UI Automation, but nothing inside the frame. The UI Automation just isn't reading the page inside the frame.

    UI Automation seems to have no problem reading inside frames in Firefox for me, but does with Internet Explorer.
    I've even created a super-basic test HTML file with one frame that loads another test HTML file, and no problem with Firefox, but UI Automation gives no automation objects for inside the frame when I open the HTML in Internet Explorer. I tried the test with both an inline frame and a normal frameset - no luck.

    Here's those super-basic test files I made:
    Main HTML file:
    <HTML>
    <Body>
        <Div>Text on main body</Div>
        <IFrame src="NestedHTML.html"></IFrame>
    </Body>
    </HTML>

    NestedHTML.html file:
    <HTML>
    <Body>
        <Div>Text in frame body</Div>
    </Body>
    </HTML>

    UI Automation sees both "Text on main body" and "Text in frame body" when the main HTML file is opened in Firefox, but only sees "Text on main body" when opened in Internet Explorer 6 or 7.

    I figured that maybe there was a security setting in Internet Explorer relating to frames that was causing this, but I mangled the security settings every which way and it didn't make a difference.

    So my question is: How can UI Automation read the HTML inside frames of a page opened in Internet Explorer?Am I the only one having this problem or is this a limitation of UI Automation?

    Thanks
    jueves, 11 de septiembre de 2008 17:05

Respuestas

  • You may want to consider using a different tool to automate inside IE.  Part of the problem you are running into is that the automation elments inside a browser are being created based on the accessibility information being provided by the browser and its not very fast or effective.

     

    Watin is an open source browser automation tool written in c# which will do everything you probably need and supports both Firefox and IE.

    http://watin.sourceforge.net/

     

    domingo, 21 de septiembre de 2008 15:39

Todas las respuestas

  • You may want to consider using a different tool to automate inside IE.  Part of the problem you are running into is that the automation elments inside a browser are being created based on the accessibility information being provided by the browser and its not very fast or effective.

     

    Watin is an open source browser automation tool written in c# which will do everything you probably need and supports both Firefox and IE.

    http://watin.sourceforge.net/

     

    domingo, 21 de septiembre de 2008 15:39
  • Thanks

    I did notice that the UI Automation Find... functions can be very slow for complex web pages. I'll take a look at WatiN as an alternative.

    I am still curious why UI Automation is having problems with Internet Explorer, since they are both Microsoft. Is IE version 8 going to support UI Automation more?
    lunes, 22 de septiembre de 2008 15:58
  • This isn't so much a limitation of UI Automation, as it is how accessibility is implemented in IE. You might want to check out this article on accessing inside frames... http://support.microsoft.com/kb/196340.

    sábado, 20 de diciembre de 2008 5:46