Web automation in iframe with javascript (dojo or jquery) – click on elements inside iframe

Local Website Environment: Apache, php, and dojo toolkit. Feel free to assume jquery instead of dojo if you’re more familiar with it.

Remote Website Environment: dojo toolkit (server software irrelevant, I have no control over it).

  • Auto minify Javascript/CSS files after update?
  • What is untrackOutstandingTimeouts setting for in Protractor?
  • Clicking submit button of an HTML form by a Javascript code
  • Protractor - Return the operating system
  • Selenium - How to check and increment dropdown value if it is already present?
  • Script/App that automatically compiles and compresses js files as you save

  • I have a web page (local website) that I have complete control over.

    On this page I have an iframe containing a web page I want to automate testing on. I want to automate the manipulation of elements by clicking buttons/links and filling form fields using dojo.

    I have been reading that there is some level of protection against manipulating pages within iframes that are across different domains. Does this mean that it is impossible to use javascript on the root page to manipulate elements within the iframe? I have also read that I may be able to get around this using a proxy.

    How can I accomplish this?

    Because of restrictions where I work I cannot install browser automation tools like selenium, watir/watij or others.

    Thanks in advance!


    Research:

    This may be on the right track for avoiding cross-domain restrictions: http://www.ghidinelli.com/2008/12/27/how-to-bypass-cross-domain-restrictions-when-developing-ajax-applications

  • How do you automate Javascript minification for your Java web applications?
  • Attach event listeners in OS X JavaScript for Automation (JXA)
  • Is it possible to automate taking a screenshot of a portion of a Web page (e.g., denoted by a CSS selector or HTML parent element)?
  • Photoshop “Save to Web” automation
  • Python / IE7 - how to bypass alert boxes
  • Use browser to run custom JavaScript on page (client side) to simulate clicking? How to do?
  • One Solution collect form web for “Web automation in iframe with javascript (dojo or jquery) – click on elements inside iframe”

    solutions:

    1. setting proxy:

      • open httpd.conf of your Apache, and append these:
      • enable proxy modules by:

        LoadModule proxy_module modules/mod_proxy.so
        LoadModule proxy_http_module modules/mod_proxy_http.so
        
      • write the proxy rule:

        ProxyPass   /localpath/ http://remote/path/
        
    2. use DOH: http://dojotoolkit.org/reference-guide/1.9/util/doh.html