0

I would like to test the output generated by some functions which are responsible to generate new content in the dom. The problem is that I need to test such scenarios without using a browser and by running xpath queries against the generated output. (something like HTMLUnit in Java). How can I write such tests? Which framework/technology can I use?

1
  • This is what you need phantomjs.org Commented Sep 14, 2012 at 8:13

1 Answer 1

1

This is usually handled by using a browser running on a fake screen (e.g. using xvfb) and driving it programmatically. Headless will let you set up xvfb from within node.js.

Phantom and Selenium provide a couple of ways to drive browsers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.