https://github.com/lambdatest/python-selenium-add-status
How to add test status in automation test in Python-selenium on LambdaTest
https://github.com/lambdatest/python-selenium-add-status
lambdatest python selenium testing
Last synced: about 2 months ago
JSON representation
How to add test status in automation test in Python-selenium on LambdaTest
- Host: GitHub
- URL: https://github.com/lambdatest/python-selenium-add-status
- Owner: LambdaTest
- Created: 2022-06-10T19:39:36.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-10T19:39:49.000Z (about 4 years ago)
- Last Synced: 2025-06-19T19:04:28.438Z (about 1 year ago)
- Topics: lambdatest, python, selenium, testing
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to add test status in automation test in Python-selenium on [LambdaTest](https://www.lambdatest.com/?utm_source=github&utm_medium=repo&utm_campaign=Python-selenium-add-status)
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](https://github.com/LambdaTest/python-selenium-sample).
## Configure testcase
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:
```python
#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")
```
## Run your test
```bash
python lambdatest.py
```
# Links:
[LambdaTest Community](http://community.lambdatest.com/)