Skip to content

Instantly share code, notes, and snippets.

@borodicht
Created December 19, 2024 18:12
Show Gist options
  • Save borodicht/726ab29612b6ac6cb527029f1823f141 to your computer and use it in GitHub Desktop.
Save borodicht/726ab29612b6ac6cb527029f1823f141 to your computer and use it in GitHub Desktop.
package steps;
import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import java.time.Duration;
public class SearchStep {
WebDriver driver;
@Given("booking search page is opened")
public void bookingSearchPageIsOpened() {
driver = new ChromeDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
driver.get("https://www.booking.com/searchresults.en-gb.html");
}
@When("user searches for {string}")
public void userSearchesFor(String arg0) {
}
@Then("{string} hotel is shown")
public void hotelIsShown(String arg0) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment