The problem is, I can't see my print in console, although I should!
def test_123(app):
wd = app.wd
app.open_page("page_adress")
time.sleep(3)
element = wd.find_element_by_xpath("locator").text
print(element)
String from my app file:
wd = webdriver.Chrome()
My test runs successful. And one more thing! If after my print command I'm putting some string which leads my test to the crash, I can see print with all other crash information.
The problem is, I can't see my print in console, although I should!
If you use behave as the launcher for the Selenium tests, you can solve this by passing --no-capture as an argument in your behave command:
behave -i my_feature.feature --no-capture
Without this argument, outputs from print() are captured and discarded.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With