/*
 * Copyright 2010, Red Hat, Inc. and individual contributors as indicated by the
 * @author tags. See the copyright.txt file in the distribution for a full
 * listing of individual contributors.
 *
 * This is free software; you can redistribute it and/or modify it under the
 * terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This software is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this software; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF
 * site: http://www.fsf.org.
 */
package org.zanata.page.utility;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.zanata.page.BasePage;
import org.zanata.page.administration.EditHomeCodePage;
import org.zanata.page.administration.EditHomeContentPage;

public class HomePage extends BasePage
{

   @FindBy(linkText = "Edit Page Content")
   private WebElement editPageContent;

   @FindBy(linkText = "Edit Page Code")
   private WebElement editPageCode;

   @FindBy(id = "main_body_content")
   private WebElement mainBodyContent;

   public HomePage(final WebDriver driver)
   {
      super(driver);
   }

   public EditHomeContentPage goToEditPageContent()
   {
      editPageContent.click();
      return new EditHomeContentPage(getDriver());
   }

   public EditHomeCodePage goToEditPageCode()
   {
      editPageCode.click();
      return new EditHomeCodePage(getDriver());
   }

   public String getMainBodyContent()
   {
      return mainBodyContent.getText();
   }
}

@@ -1005,16 +1005,47 @@
 ility;%0A%0A
+import org.openqa.selenium.By;%0A
 import o
@@ -1074,16 +1074,16 @@
 Driver;%0A
-
 import o
@@ -1351,168 +1351,8 @@
 %0A%7B%0A%0A
-   @FindBy(linkText = %22Edit Page Content%22)%0A   private WebElement editPageContent;%0A%0A   @FindBy(linkText = %22Edit Page Code%22)%0A   private WebElement editPageCode;%0A%0A
    @
@@ -1566,23 +1566,65 @@
     
-edit
+getDriver().findElement(By.linkText(%22Edit 
 Page
+ 
 Content
+%22))
 .cli
@@ -1747,20 +1747,62 @@
     
-edit
+getDriver().findElement(By.linkText(%22Edit 
 Page
+ 
 Code
+%22))
 .cli

move admin visible elements out of annotated fields