How to add test status in automation test in Python-selenium on LambdaTest
If you want to add test status in automation test in Python-selenium on LambdaTest, you can follow the below steps. You can refer to sample test repo here.
After the execution of a testcase, you have to execute a script (lambda-status) to pass "passed" or "failed" based on the execution. See the example code below:
#testcase pass condition
if(testcase_pass = True):
driver.execute_script("lambda-status=passed")
print("Tests are run successfully!")
else:
driver.execute_script("lambda-status=failed")
python lambdatest.py