All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pages.herokuapp.HomePage Maven / Gradle / Ivy

Go to download

An open-source Selenium Java-based Test automation Framework that allows you to perform multiple actions to test a web application's functionality, behaviour, which provides easy to use syntax, and easy to set up environment according to the needed requirements for testing

There is a newer version: 1.1.1
Show newest version
package pages.herokuapp;

import driverfactory.webdriver.WebDriver;
import io.qameta.allure.Step;
import org.openqa.selenium.By;

public class HomePage {

    private final WebDriver driver;

    By basicAuthLink = By.xpath("//a[@href='/basic_auth']");
    By jsAlerts = By.xpath("//a[@href='/javascript_alerts']");
    By fileUpload = By.xpath("//a[@href='/upload']");

    public HomePage(WebDriver driver) {
        this.driver = driver;
    }

    @Step("When user clicks on Alert page link")
    public AlertHandling openJSAlertsPage()
    {
        driver.element().click(jsAlerts);
        return new AlertHandling(driver);
    }

    @Step("When user clicks on Alert page link")
    public BasicAuthentication openBasicAuthPage()
    {
        driver.element().click(basicAuthLink);
        return new BasicAuthentication(driver);
    }

    @Step("When user clicks on Alert page link")
    public FileUpload openFileUploadPage()
    {
        driver.element().click(fileUpload);
        return new FileUpload(driver);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy