001/* 002 * (C) Copyright 2012 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 * <a href=mailto:vpasquier@nuxeo.com>Vladimir Pasquier</a> 016 */ 017package org.nuxeo.functionaltests.pages.actions; 018 019import org.nuxeo.functionaltests.pages.AbstractPage; 020import org.openqa.selenium.WebDriver; 021import org.openqa.selenium.WebElement; 022import org.openqa.selenium.support.FindBy; 023 024/** 025 * The document contextual actions 026 */ 027public class ContextualActions extends AbstractPage { 028 029 @FindBy(xpath = "//img[@alt=\"Lock\"]") 030 public WebElement lockButton; 031 032 @FindBy(xpath = "//img[@alt=\"Follow this Document\"]") 033 public WebElement followButton; 034 035 @FindBy(xpath = "//img[@alt=\"Add to Worklist\"]") 036 public WebElement addToWorklistButton; 037 038 @FindBy(id = "nxw_permalinkAction_form:nxw_documentActionsUpperButtons_permalinkAction_subview:nxw_documentActionsUpperButtons_permalinkAction_link") 039 public WebElement permaButton; 040 041 public String permaBoxFocusName = "permalinkFocus"; 042 043 @FindBy(id = "fancybox-close") 044 public WebElement closePermaBoxButton; 045 046 @FindBy(xpath = "//div[@id=\"nxw_documentActionsUpperButtons_panel\"]/div/ul/li") 047 public WebElement moreButton; 048 049 @FindBy(xpath = "//img[@alt=\"Export\"]") 050 public WebElement exportButton; 051 052 @FindBy(xpath = "//img[@alt=\"Add to Favorites\"]") 053 public WebElement favoritesButton; 054 055 public ContextualActions(WebDriver driver) { 056 super(driver); 057 } 058 059 public void clickOnButton(WebElement button) { 060 button.click(); 061 } 062}