Does Selenium support headless browser testing?

前端 未结 12 2796
说谎
说谎 2020-11-27 03:49

I\'m looking at Selenium Server at the moment, and I don\'t seem to notice a driver that supports headless browser testing.

Unless I\'m mistaken, it doesn\'t support

12条回答
  •  孤城傲影
    2020-11-27 04:04

    you need not use PhantomJS as an alternative to Selenium. Selenium includes a PhantomJS webdriver class, which rides on the GhostDriver platform. Simply install the PhantomJS binary to your machine. in python, you can then use:

    from selenium import webdriver
    dr = webdriver.PhantomJS() 
    

    and voila.

提交回复
热议问题