11import os
2- import shutil
32
43import pytest
54
@@ -10,43 +9,16 @@ def pytest_configure(config):
109 # of pytest so they can't reliably be removed by a fixture.
1110 config .cache .set ('qmxgraph/ports' , [])
1211
13- # Ensure phantomjs is available.
14- phantomjs = shutil .which ("phantomjs" )
15- assert phantomjs is not None
16-
1712 lock_file = _get_port_lock_filename (config .rootdir )
1813 if os .path .isfile (lock_file ):
1914 os .remove (lock_file )
2015
2116
2217# Fixtures --------------------------------------------------------------------
23-
24-
25- @pytest .fixture
26- def phantomjs_driver (capabilities , driver_path , port ):
27- """
28- Overrides default `phantomjs_driver` driver from pytest-selenium.
29-
30- Default implementation uses ephemeral ports just as our tests but
31- it doesn't provide any way to configure them, for this reason we basically
32- recreate the driver fixture using port fixture.
33- """
34- kwargs = {}
35- if capabilities :
36- kwargs ['desired_capabilities' ] = capabilities
37- if driver_path is not None :
38- kwargs ['executable_path' ] = driver_path
39-
40- kwargs ['port' ] = port .get ()
41-
42- from selenium .webdriver import PhantomJS
43-
44- return PhantomJS (** kwargs )
45-
46-
4718@pytest .fixture
48- def driver_args ():
49- return ['--debug=true' ]
19+ def firefox_options (firefox_options ):
20+ firefox_options .headless = True
21+ return firefox_options
5022
5123
5224@pytest .fixture (autouse = True )
0 commit comments