argparse.ArgumentError: argument --browser: conflicting option string: --browser #976
-
E:\BaiduNetdiskWorkspace\SeleniumBase-master\examples>pytest my_first_test.py --demo E:\BaiduNetdiskWorkspace\SeleniumBase-master\examples> ask for help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
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 |
Beta Was this translation helpful? Give feedback.
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 customconftest.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.