Basically I wrote a step called
@When("I go to {url}")
Then I called it from the feature file using
When I go to http://youtube.com
and it worked
But I want to call it using
When I go to YouTube
Same would happen with css selectors (For Then logo is visible
looks prettier than Then div#id.class is visible
)
How can I link a map file containing this css selectors and URL's as variables for my steps to use? Something like this:
YouTube = "http://youtube.com"
logo = "div#id.class"
I tried this
def before_all(context):
global YouTube
YouTube = "http://youtube.com"
And then I would eval(url)
inside the step but it kept saying YouTube was not defined