package com.atlassian.webdriver.bitbucket.element;

import com.atlassian.pageobjects.elements.PageElement;
import com.atlassian.pageobjects.elements.WebDriverLocatable;
import com.atlassian.pageobjects.elements.timeout.TimeoutType;
import org.openqa.selenium.By;

import javax.annotation.Nonnull;

public class TabItem extends LegacyElementPageObject {

    public TabItem(@Nonnull PageElement pageElement) {
        super(pageElement);
    }

    public TabItem(WebDriverLocatable locatable, TimeoutType timeoutType) {
        super(locatable, timeoutType);
    }

    @Override
    public PageElement click() {
        return this.find(By.tagName("a")).click();
    }
}
