def test_ff_not_running(xvfb, tmpdir, request): # start and stop firefox FirefoxWrapper( tmpdir, executable=request.config.getoption('--firefox')).start().stop() assert func.read_profile_state(tmpdir) == func.ProfileState.CLOSED assert not ebd.FirefoxProfile(None, tmpdir).is_profile_running()
def test_ff_crashed(xvfb, tmpdir, request): # start and kill firefox FirefoxWrapper( tmpdir, executable=request.config.getoption('--firefox')).start().kill() assert func.read_profile_state(tmpdir) == func.ProfileState.UNKNOWN # it should be detected as if it was running assert ebd.FirefoxProfile(None, tmpdir).is_profile_running()
def test_ff_schema_containers(blank_profile): ebd.FirefoxProfile(None, blank_profile).reader().containers()
def test_ff_schema_bookmarks(blank_profile): ebd.FirefoxProfile(None, blank_profile).reader().bookmarks()
def test_ff_schema_history(blank_profile): ebd.FirefoxProfile(None, blank_profile).reader().history()
def test_ff_schema_extensions(blank_profile): ebd.FirefoxProfile(None, blank_profile).reader().extensions()
def test_ff_schema_account(blank_profile): ebd.FirefoxProfile(None, blank_profile).reader().account()
def test_ff_schema_last_session(blank_profile): ebd.FirefoxProfile(None, blank_profile).reader().last_session()
def test_ff_running(xvfb, tmpdir, request): with FirefoxWrapper(tmpdir, executable=request.config.getoption('--firefox')): assert func.read_profile_state(tmpdir) == func.ProfileState.RUNNING assert ebd.FirefoxProfile(None, tmpdir).is_profile_running()