Skip to content

argparse.ArgumentError: argument --browser: conflicting option string: --browser #976

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

You must be logged in to vote

Hi @kingswangxu, that error occurs when the same pytest command-line argument is being defined in more than two places. Have you previously installed a framework that has --browser defined as one of the available options? Or are you trying to define extra arguments in a custom conftest.py file? You can get around this by installing SeleniumBase in a new virtual environment if you can't figure out where the other definitions are defined. Or if you can find the other location where --browser is defined, then just remove that definition. If another framework/library has it, pip uninstall it. Command-line arguments can only be defined once per argument.

Replies: 1 comment 2 replies

Comment options

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

@STARKILLER-1
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
3 participants