Hi
I am new to cucumber and as well as in Ruby, am creating a project in Ruby and this is my folder structure
Feature - Step definition
- Support - env.rb
- Gemfile
- Gemfile.lock
The issue am facing is where do I specify what browser to be used and if both can run at the same time using the format below
Parameters("browser")
BeforeTest
public void setup(String browser){
if (browser.equalsIgnoreCase("firefox"))
{
System.setProperty("webdriver.gecko.driver", "\Users\<name>\Desktop\Automation\Jar\geckodriver.exe");
driver = new FirefoxDriver();
}
else if (browser.equalsIgnoreCase("chrome"))
{
System.setProperty("webdriver.chrome.driver", "\Users\<name>\Desktop\Automation\Jar\chromedriver.exe");
driver = new ChromeDriver();
}
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.manage().window().maximize();
}
Am current using Macbook and am using selenium webdriver with a little bit of Ruby that I have learnt so far.
I will be grateful if someone can assist me with this
Thanks