You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently setting the profile via command line with --firefox-profile=PATH, but am wondering if it is possible to do so with a fixture. I was looking through the codebase and saw --firefox-path is set via firefox-profile in pytest_selenium.py. I also saw this ticket relating to defining preferences #86
So I set up my fixture like so, but it seems to not use the correct profile
These fixtures are not currently documented, which I should fix. It's actually a better way to specify a profile than using the command line. The important thing to note is that firefox_profile in this case is a FirefoxProfile object, and if you don't need to modify that, then you don't need to include it in the method signature of your fixture. Here are a few ideas to try, and if you're interested in helping to improve the docs, that would be awesome:
Thanks @davehunt those work as well. The issue I'm running into has to do with my own pytest_addoption I'm calling for handling production vs branch urls. I noticed pytest-selenium has a plugin for just this feature so I'm working on converting over to that.
I'm currently setting the profile via command line with --firefox-profile=PATH, but am wondering if it is possible to do so with a fixture. I was looking through the codebase and saw --firefox-path is set via firefox-profile in pytest_selenium.py. I also saw this ticket relating to defining preferences #86
So I set up my fixture like so, but it seems to not use the correct profile
Edit: So it turns out the set up I have in conftest works fine, the issue is being caused by an additional pytest_addoption I'm passing through.
The text was updated successfully, but these errors were encountered: