Kick start browser automation in cucumber using kotlin
System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir")+"\\driver\\chromedriver.exe")
driver = ChromeDriver()
Given("I am on the Google search page") {
driver.get("https:\\www.google.com")
}
GitHub https://github.com/dickensas/kotlin-gradle-templates/tree/master/cucumber
Use the above to do a google search using Selenium WebDriver and Gherkin feature
Make sure you download the chrome driver
And place the driver exe inside the project <rootfolder>/driver
The code will launch the browser and do a google search and look for a html tag and validate it