-1

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?

Al Imran
  • 876
  • 7
  • 27
  • I see this is your first question. Keep in mind this: "Questions are supposed to include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it **in the question itself**. Questions without a **clear problem statement** are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)". Can you please [edit](https://stackoverflow.com/posts/53633938/edit) your question and add more info? – tgogos Dec 05 '18 at 14:05
  • Sorry if I wasn't clear enough, I edited my question. But if somebody has been using Python Behave I presume he will understand what I need. – Hrvoje Štefek Dec 05 '18 at 14:30

1 Answers1

0

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.