Skip to content

I can't use the conftest file feature of pytest properly #1345

Answered by mdmintz
HellShuro asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @HellShuro,
For the code auto-completion part, you'll need to use BaseCase inheritance, as most code editors will not be able to parse the methods from the pytest sb fixture.
For all standard SeleniumBase tests, the browser is spun up automatically at the start of every test, and then spun down automatically at the end of it. It replaces the need for having to use a conftest.py file to do that. If you need more driver control, you can use the example from https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_override_driver.py for overriding the driver as needed. You can also override the setUp() and tearDown() methods from tests that inherit BaseCase (see https://gith…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@HellShuro
Comment options

@HellShuro
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants