How to make Firefox headless programmatically in Selenium with Python?

后端 未结 6 1011
面向向阳花
面向向阳花 2020-11-22 11:37

I am running this code with python, selenium, and firefox but still get \'head\' version of firefox:

binary = FirefoxBinary(\'C:\\\\Program Files (x86)\\\\Mo         


        
6条回答
  •  南方客
    南方客 (楼主)
    2020-11-22 11:54

    Just a note for people who may have found this later (and want java way of achieving this); FirefoxOptions is also capable of enabling the headless mode:

    FirefoxOptions firefoxOptions = new FirefoxOptions();
    firefoxOptions.setHeadless(true);
    

提交回复
热议问题