package stepDefinition;

import io.cucumber.java.en.Given;
import io.cucumber.java.en.Then;
import io.cucumber.java.en.When;
import zacksolutions.base.Initialization;
import zacksolutions.pages.HomePage;

import java.io.IOException;

public class StepDefinition extends Initialization {

    @Given("Initialize the remote webdriver Firefox")
    public void initializeTheRemoteWebdriverFirefox() {
        BrowserInit("firefox");
    }

    @Given("navigate to {string}")
    public void navigate_to(String url) {
        // Write code here that turns the phrase above into concrete actions
        driver.get(url);
    }
    @When("User type text into the text box and hit click")
    public void user_type_text_into_the_text_box_and_hit_click() throws IOException, InterruptedException {
        // Write code here that turns the phrase above into concrete actions
        HomePage hp = new HomePage();
        hp.insertText();
    }
    @Then("Text is displayed {string}")
    public void text_is_displayed(String string) {
        // Write code here that turns the phrase above into concrete actions
        HomePage hp = new HomePage();
        hp.textConfirmation();
    }
}
