Giter VIP home page Giter VIP logo

Comments (7)

anseki avatar anseki commented on June 18, 2024

Hi @dpilafian, thank you for the comment.
The test-page-loader works fine in a headless browser such as PhantomJS because it only handles DOM (makes iframes and loads pages), it does nothing to the browser.

from test-page-loader.

anseki avatar anseki commented on June 18, 2024

I waited for it, and no reply came, and I close this issue.

from test-page-loader.

dpilafian avatar dpilafian commented on June 18, 2024

I did get it hooked up, but the iframe remains empty (even though the src attribute gets correctly set). This may be due to the same-origin policy restriction.

from test-page-loader.

anseki avatar anseki commented on June 18, 2024

If you don't make the browser run correctly about security, it should throw an Uncaught DOMException error. You can find that error in the log. It is unrelated to the test-page-loader.
Try this: https://github.com/anseki/test-page-loader#examples

from test-page-loader.

anseki avatar anseki commented on June 18, 2024

BTW,
You'd better make sure whether that iframe is really empty or it looks like empty because JavaScript can't run.
For example, try to load a page that doesn't contain JavaScript.

from test-page-loader.

dpilafian avatar dpilafian commented on June 18, 2024

Yes, the iframe really is empty.

This is not a bug in test-page-loader. However, the security issue does appear to make it impractical to use test-page-loader to load an HTML page into a headless Jasmine spec.

from test-page-loader.

anseki avatar anseki commented on June 18, 2024

I have never read your code, but at least, I'm using PhantomJS v2.1.1 + Jasmine v2.5.2 + test-page-loader without any problems. The test-page-loader works with PhantomJS, and Jasmine outputs that report perfectly.
As I said before, you'd better check the log (page.onConsoleMessage). Because that error message should be output if it has the security problem.
Also, if your code really has a problem about the same-origin by locally accessing, the code I gave will help you.

from test-page-loader.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.