I'm using Python Behave BDD
tests. I have written multiple tests and only one test requires fullReset
set to false, noReset
set to true and different appWaitActivity
than other tests. Is there some way to make in the device.py
file for the test to recognize this test and then set those desired caps? Like with if scenario name is "that" then allow those caps, any advice is helpful.
My question is if it is possible to retrieve Cucumber
Scenario name in Python
code which runs this test?
I found one possible solution. You can put
import sys
and later you can add
if sys.argv[1] == name_needed_test:
In this if clause you can put desired capabilities you need.