Pycharm: Cannot see print() how do I run feature files in Python Console?

Viewed 30

I'm confused with the answers I found so I created a separate question :(

I am currently using Pycharm Community Edition and I am trying to run my feature file using console but I am not sure how to. I have a print() statement but I cannot see the contents of the variable as it is not printing in the terminal. How do I run the feature file in console?

When I run in terminal, all of my steps are passed. But I cannot see any print() statement being returned. :/

I tried setting up the run configuration but I am getting an error :/ enter image description here

Here is a sample of what I'm doing

Scenario: Scenario title
    Given user just wants to print please

.py

@given("user just want to print please")
def step_impl(context):
    baseURL = "someUrl"
    context.driver = webdriver.Firefox()
    context.login = login(context.driver)
    context.driver.get(baseURL)
    context.login.userLogin('someEmail@email.com', 'somePassword')
    print("Hello")

Output: (No "Hello")

enter image description here

After pointing the working directory to steps folder enter image description here

1 Answers

The error at the bottom says you don't have a working directory. Create a working directory and try again.

Related