Search code examples
pythonseleniumcmdenvironment-variablespython-behave

why Im getting "behave is not recognized as an internal or external command" on windows


I installed python 3.9 selenium and behave I want to run first feature file but had "behave is not recognized as an internal or external command"

I added C:\ProgramFiles\Python39\Scripts\ and C:\ProgramFiles\Python39\ to environemt var and to system path variables. In cmd when typing python --version I got proper answser.

I dont have any code yet just Scenario in Feature file

Also I dont see Behave configuration template when try to ADD Configuration to run Behave trough Pycharm, so Behave is not installed Scenario: some scenario Given ... When ... Then ... when typing behave login.feature got this error


Solution

  • The Documentation has a set of usage instructions like:

    Usage:
    Basic usage of this library with behave requires the following steps:
    1) import the step implementations
    2) set the behave_driver attribute on the behave context in your environment.py file.
    3) write your feature file
    4) run behave
    

    are you sure you did what's mentioned? Please share your code to understand it better.