Stefan
Stefan

Reputation: 9599

Use phantomjs to drive chrome

Is there a way to use phantomjs to drive my firefox/chrome browser?

We have a bunch of casperjs tests, that I would like to run directly in the browser for debugging ( or just pure interrest ).

I seem to recall that a long time ago, before phantomjs became pure headless, I could do this by making it run on X instead of xvfb and removing/uncommenting the phantom.exit() line.

Upvotes: 2

Views: 4113

Answers (1)

asgoth
asgoth

Reputation: 35829

PhantomJs IS a browser, so the answer is no. You may want to look into Karma however.

You just use a config file which allows you to provide a browser to run your tests in:

  • Chrome
  • ChromeCanary
  • Firefox
  • Opera
  • Safari (only Mac)
  • PhantomJS
  • IE & Edge (only Windows)
  • SauseLabs, BrowserStack Electron, & more

Still, your tests will need to be written in QUnit, Jasmine, Mocha, ... which can be too much work to port from CasperJs.

Upvotes: 1

Related Questions