001/*
002 * (C) Copyright 2011 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Sun Seng David TAN <stan@nuxeo.com>
016 */
017package org.nuxeo.functionaltests.pages.tabs;
018
019import org.nuxeo.functionaltests.pages.DocumentBasePage;
020import org.openqa.selenium.WebDriver;
021import org.openqa.selenium.WebElement;
022import org.openqa.selenium.support.FindBy;
023
024/**
025 * @author Sun Seng David TAN <stan@nuxeo.com>
026 */
027public class ManageTabSubPage extends DocumentBasePage {
028
029    @FindBy(xpath = "//a[contains(@id,'nxw_TAB_RIGHTS')]/span")
030    WebElement accessRightsLink;
031
032    @FindBy(xpath = "//a[contains(@id,'nxw_TAB_TRASH_CONTENT')]/span")
033    WebElement trashLink;
034
035    public ManageTabSubPage(WebDriver driver) {
036        super(driver);
037    }
038
039    /**
040     * @deprecated since 7.10. Use {@link PermissionsSubPage} instead.
041     * @return
042     */
043    @Deprecated
044    public AccessRightsSubPage getAccessRightsSubTab() {
045        clickOnDocumentTabLink(accessRightsLink);
046        return asPage(AccessRightsSubPage.class);
047    }
048
049    public TrashSubPage getTrashSubTab() {
050        clickOnDocumentTabLink(trashLink);
051        return asPage(TrashSubPage.class);
052    }
053
054}