This project is using NodeJS, Cucumber, Gherkin, Selenium.
I am trying to pass either a stored value or for now, a value in this example it would be a URL from the feature file into the step definitions file through the usage of regular expressions.
An example of a feature i would like to use (< url > is my guess-work which i've seen in other examples, which doesnt seem to work)
Scenario: 0 | A User Logging In
Given I open the page with the <url>
And then also my step definitions file
Given("/^I open the page with the url? (.*)$/"), function(next){
driver.get("http://localhost:3000/login");
pageElement = driver.findElement(By.id("email"));
pageElement.sendKeys("example@email.co.uk");
next();
};
I believe my step definitions file is correct however i'm not positive.
If you need any more information about my project please let me know i am active throughout the day on stack-overflow and aim to have this working quickly.
Thank you in advance for any support, Jack