Which drivers support “no-browser”/“headless” testing?

和自甴很熟 提交于 2019-11-26 18:38:29

问题


Actually I want to run my selenium code on server where dont want open the any browser. But I am confused which webdriver is use for the server which do all task (where I download some files from some site and store in my server).


回答1:


To execute your Test Suite through Selenium without opening any browser you can use any of the Browser Client from the following list :

  • Headless Chrome : Here you can find an working example.
  • Headless Firefox : Here you can find an working example.
  • PhantomJS : Here you can find an working example.
  • HtmlUnitDriver : Here you can find an working example.
  • headless-selenium-for-win : Here you can find a detailed discussion.

Headless Browser

Headless Browser is a web browser without a Graphical User Interface controlled programmatically used for automation, testing, and other purposes.

Headless Browser Engines

These Headless Browser Engines fully render web pages or run JavaScript in a virtual DOM :

Headless Multi Drivers

These Headless Multi Drivers libraries can control multiple browser engines (typically using Selenium) :




回答2:


HtmlUnitDriver and PhantomJSDriver are two webdrivers for headless testing without need of opening browsers.



来源:https://stackoverflow.com/questions/48368002/which-drivers-support-no-browser-headless-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!