package Inbox;

import Support.BasicPage;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;
import org.openqa.selenium.support.PageFactory;
import org.testng.Assert;
import org.testng.asserts.SoftAssert;

public class InboxPage extends BasicPage {
    private WebDriver driver;
    private SoftAssert sa = new SoftAssert();

    @FindBy(how=How.XPATH, using = "//*[@id='content']/nav/div/div/ul[1]/li[1]/a/span[2]")
    WebElement inboxButton;
    @FindBy(how=How.ID, using = "user")
    WebElement userCombobox;
    @FindBy(how=How.ID, using = "logo")
    WebElement logo;

    /**
     * constructor
     * @param driver WebDriver which we are using
     */
    public InboxPage(WebDriver driver, SoftAssert sa)
    {
        super(driver);
        this.sa = sa;
    }

    /**
     * go to inbox
     */
    public void goToInbox()
    {
        Assert.assertTrue(isElementPresent(inboxButton),"Inbox button in left menu is not displayed!");
        inboxButton.click();
    }



}
