Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show the page while testing with PhantomJS through Selenium

I'm making a test of my Django app using Selenium and PhantomJS. I'm debugging a failure of the test. Is there a way to make the headless PhantomJS suddenly show like a real browser on the screen so I could easily debug the problem?

like image 866
Ram Rachum Avatar asked Sep 09 '14 20:09

Ram Rachum


People also ask

Does Selenium support PhantomJS?

"Selenium support for PhantomJS has been deprecated, please use headless versions of Chrome or Firefox instead" #48.

Is PhantomJS faster than Selenium?

Key Differences Between Selenium and PhantomJS Being a headless browser, the interactions are much faster than the real browser. So the performance time is smoother in PhantomJS than in Selenium.


1 Answers

Although it's not possible to open browser, you could take screenshots at the failure point. That would help you see why and where your test is failing. http://phantomjs.org/screen-capture.html

like image 198
Caren Avatar answered Oct 31 '22 20:10

Caren