commit adfb51b3af9fd1deaf16808e48b0bbf1ee904243
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Tue Dec 4 13:24:24 2012 +0000

    fixing #2987 (selenium test Illicium@floramalesiana(eu.etaxonomy.dataportal.selenium.tests.flMalesiana.FloraMalesiana_OriginalSourceTest) fails due to timeouts) and adapting code to selenium 2.26.0 in pom

diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/BaseElement.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/BaseElement.java
index 85905dea..6289e392 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/BaseElement.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/BaseElement.java
@@ -17,7 +17,11 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.openqa.selenium.By;
 import org.openqa.selenium.NoSuchElementException;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebDriverException;
 import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.WebDriverWait;
 
 /**
  * @author Andreas Kohlbecker
@@ -38,6 +42,8 @@ public class BaseElement {
 
     private List<LinkElement> linksInElement = null;
 
+    List<String> linkTargets = null;
+
     private String text = null;
 
 
@@ -88,21 +94,49 @@ public class BaseElement {
         return linksInElement;
     }
 
-    public List<String> getLinkTargets(){
-
-        List<String> targets = new ArrayList<String>();
+    /**
+     *
+     * @param driver the currently used  WebDriver instance
+     * @return
+     */
+    public List<String> getLinkTargets(WebDriver driver){
 
-        if(getElement().getTagName().equals("a") && getElement().getAttribute("target") != null  && getElement().getAttribute("target").length() > 0){
-            targets.add(getElement().getAttribute("target"));
-        } else {
-            try {
-                targets.add(getElement().findElement(By.xpath("./a[@target]")).getAttribute("target"));
-            } catch (NoSuchElementException e) {
-                logger.debug("No target window found");
-                /* IGNORE */
+        if(linkTargets == null){
+            linkTargets = new ArrayList<String>();
+            if(getElement().getTagName().equals("a") && getElement().getAttribute("target") != null  && getElement().getAttribute("target").length() > 0){
+                linkTargets.add(getElement().getAttribute("target"));
+            } else {
+                try {
+                    WebDriverWait wait = new WebDriverWait(driver, 5);
+
+                    List<WebElement> anchorTags = wait.until(new ExpectedCondition<List<WebElement>>(){
+                        @Override
+                        public List<WebElement> apply(WebDriver d) {
+                            return d.findElements(By.tagName("a"));
+                        }
+                      }
+                    );
+
+                    WebElement linkWithTarget = null;
+                    if(anchorTags.size() > 0){
+                        if(anchorTags.get(0).getAttribute("target") != null) {
+                            linkWithTarget = anchorTags.get(0);
+                        }
+                    }
+
+                    if(linkWithTarget != null){ // assuming that there is only one
+                        linkTargets.add(linkWithTarget.getAttribute("target"));
+                    }
+                } catch (NoSuchElementException e) {
+                    logger.debug("No target window found");
+                    /* IGNORE */
+                } catch (WebDriverException e) {
+                    logger.debug("timed out", e);
+                    /* IGNORE */
+                }
             }
         }
-        return targets;
+        return linkTargets;
     }
 
     /**
@@ -125,7 +159,8 @@ public class BaseElement {
     /**
      * @return
      */
-    public String toSting() {
+    @Override
+    public String toString() {
         return this.getClass().getSimpleName() + "<" + this.getElement().getTagName() + ">" ;
     }
 
@@ -150,9 +185,11 @@ public class BaseElement {
         if(textSnipped.length() > 50){
             textSnipped = textSnipped.substring(0, 50) + "...";
         }
-        List<String> targets = getLinkTargets();
-        return "<" + getElement().getTagName() + " class=\""+ getElement().getAttribute("class")+ "\"/>" + textSnipped + " ;Links:" + links + (targets.isEmpty()? "" : ", LinkTargets: '" + StringUtils.join(targets,	", ") + "'");
+        String targets = "LinkTargets UN-INITIALIZED";
+        if(linkTargets != null) {
+            targets = linkTargets.isEmpty()? "" : ", LinkTargets: '" + StringUtils.join(linkTargets.toArray(),	", ") + "'";
+        }
+        return "<" + getElement().getTagName() + " class=\""+ getElement().getAttribute("class")+ "\"/>" + textSnipped + " ;Links:" + links + targets;
     }
 
-
 }
\ No newline at end of file
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/LinkElement.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/LinkElement.java
index 2b91d2fd..386f8450 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/LinkElement.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/LinkElement.java
@@ -22,6 +22,7 @@ import org.openqa.selenium.WebElement;
 public class LinkElement extends BaseElement {
 
 	private String href = null;
+
 	public String getUrl() {
 		return href;
 	}
@@ -47,8 +48,8 @@ public class LinkElement extends BaseElement {
 	}
 
 	@Override
-	public String toSting(){
-		return super.toSting() + ": " + getUrl() + "";
+	public String toString(){
+		return super.toString() + ": " + (getUrl() != null ? getUrl() : "NO URL") + "";
 	}
 
 	public static boolean testIfLinkElement(BaseElement element, String text, String href) {
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/MultipartDescriptionElementRepresentation.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/MultipartDescriptionElementRepresentation.java
index a7db0f7c..db937c69 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/MultipartDescriptionElementRepresentation.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/MultipartDescriptionElementRepresentation.java
@@ -68,7 +68,7 @@ public class MultipartDescriptionElementRepresentation extends DescriptionElemen
 	}
 
 	@Override
-	public String toSting() {
+	public String toString() {
 		StringBuilder toStringRepresentatin = new StringBuilder(this.getClass().getSimpleName());
 		for (DescriptionElementRepresentation element : multipartElements) {
 			toStringRepresentatin.append("<" + element.getElement().getTagName() + ">");
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TaxonListElement.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TaxonListElement.java
index 71999392..cc82fdad 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TaxonListElement.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/TaxonListElement.java
@@ -9,23 +9,9 @@
 */
 package eu.etaxonomy.dataportal.elements;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.Box.Filler;
-
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebElement;
 
-import eu.etaxonomy.dataportal.pages.GenericPortalPage;
-import eu.etaxonomy.dataportal.pages.PortalPage;
-import eu.etaxonomy.dataportal.pages.TaxonProfilePage;
-import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage;
-import eu.etaxonomy.dataportal.selenium.AllTrue;
-import eu.etaxonomy.dataportal.selenium.JUnitWebDriverWait;
-import eu.etaxonomy.dataportal.selenium.PageTitleValidated;
-import eu.etaxonomy.dataportal.selenium.VisibilityOfElementLocated;
-
 /**
  * @author andreas
  * @date Aug 29, 2011
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java
index 2efbedb7..028c4c33 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/PortalPage.java
@@ -8,7 +8,6 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.bcel.verifier.exc.LinkingConstraintException;
-import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.openqa.selenium.By;
 import org.openqa.selenium.NoSuchElementException;
@@ -334,13 +333,13 @@ public abstract class  PortalPage {
     public <T extends PortalPage> T clickLink(BaseElement element, Function<? super WebDriver, Boolean> isTrue, Class<T> type, Long duration, TimeUnit waitUnit) {
 
         String targetWindow = null;
-        List<String> targets = element.getLinkTargets();
+        List<String> targets = element.getLinkTargets(driver);
         if(targets.size() > 0){
             targetWindow = targets.get(0);
         }
 
-        if(logger.isInfoEnabled()){
-            logger.info("clicking on " + element.toStringWithLinks());
+        if(logger.isInfoEnabled() || logger.isDebugEnabled()){
+            logger.info("clickLink() on " + element.toStringWithLinks());
         }
         element.getElement().click();
         if(targetWindow != null){
@@ -386,15 +385,15 @@ public abstract class  PortalPage {
     }
 
 
-	/**
-	 * replaces all underscores '_' by hyphens '-'
-	 *
-	 * @param featureName
-	 * @return
-	 */
-	protected String normalizeClassAttribute(String featureName) {
-	    return featureName.replace('_', '-');
-	}
+    /**
+     * replaces all underscores '_' by hyphens '-'
+     *
+     * @param featureName
+     * @return
+     */
+    protected String normalizeClassAttribute(String featureName) {
+        return featureName.replace('_', '-');
+    }
 
 
 }
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSearchResultPage.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSearchResultPage.java
index 2f6da61c..d1f364f0 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSearchResultPage.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/pages/TaxonSearchResultPage.java
@@ -35,134 +35,135 @@ import eu.etaxonomy.dataportal.selenium.VisibilityOfElementLocated;
  */
 public class TaxonSearchResultPage extends GenericPortalPage {
 
-	public static final Logger logger = Logger.getLogger(TaxonSearchResultPage.class);
-
-	private static String drupalPagePathBase = "cdm_dataportal/search/taxon";
-
-	@FindBy(id="search_results")
-	@CacheLookup
-	private WebElement searchResults;
-
-	//class=page_options
-	@FindBy(className="page_options")
-	@CacheLookup
-	private WebElement pageOptions;
-
-	//class=pager
-	@FindBy(className="pager")
-	@CacheLookup
-	private WebElement pager;
-
-
-	/* (non-Javadoc)
-	 * @see eu.etaxonomy.dataportal.pages.PortalPage#getDrupalPageBase()
-	 */
-	@Override
-	protected String getDrupalPageBase() {
-		return drupalPagePathBase;
-	}
-
-	/**
-	 * @param driver
-	 * @param context
-	 * @throws Exception
-	 */
-	public TaxonSearchResultPage(WebDriver driver, DataPortalContext context) throws Exception {
-		super(driver, context);
-	}
-
-
-	/**
-	 * Find and return the result n-th item of the result list.
-	 * The item can be specified by the index paramter.
-	 * @param index 1-based index to identify the resultset item.
-	 * This index will be used in a xpath query.
-	 * @return
-	 */
-	public TaxonListElement getResultItem(int index) {
-
-		TaxonListElement entry = new TaxonListElement(searchResults.findElement(By.xpath("ul/li[" + index + "]")));
-
-		return entry;
-	}
-
-	/**
-	 * Find and returns all items of the result list.
-	 * @return
-	 */
-	public List<TaxonListElement> getResultItems() {
-
-		List<WebElement> entryList = searchResults.findElements(By.xpath("/ul/li"));
-		List<TaxonListElement> taxonListElements = new ArrayList<TaxonListElement>();
-		for(WebElement entry : entryList){
-			taxonListElements.add(new TaxonListElement(entry));
-		}
-		return taxonListElements;
-	}
-
-	/**
-	 * @throws Exception
-	 *
-	 */
-	@SuppressWarnings("unchecked")
-	public <T extends PortalPage> T  clickTaxonName(TaxonListElement taxonListElement) throws Exception {
-
-		LinkElement taxonlink = new LinkElement(taxonListElement.getElement().findElement(By.tagName("a")));
-		return (T) clickLink(taxonlink, new VisibilityOfElementLocated(By.id("featureTOC")), TaxonProfilePage.class, 2l, TimeUnit.MINUTES);
-
-	}
-
-	/**
-	 * @return a two dimensional array representing the media items in the gallery, or null if no gallery exists.
-	 */
-	public List<List<GalleryImage>> getGalleryImagesOf(TaxonListElement taxonListElement) {
-
-
-		WebElement gallery = taxonListElement.getElement().findElement(By.className("media_gallery"));
-
-		if( gallery == null){
-			return null;
-		}
-
-		ArrayList<List<GalleryImage>> galleryImageRows = new ArrayList<List<GalleryImage>>();
-
-		List<WebElement> tableRows = gallery.findElements(By.tagName("tr"));
-		logger.debug("GalleryImages - total rows " + tableRows.size());
-		// loop table rows
-		for(int rowId = 0; rowId * 2 < tableRows.size() && tableRows.size() > 0; rowId++ ){
-			logger.debug("GalleryImages - gallery row " + rowId );
-			List<WebElement> imageCells = tableRows.get(rowId * 2).findElements(By.tagName("td"));
-			logger.debug("GalleryImages - number of image cells: " + imageCells.size());
-			List<WebElement> captionCells = null;
-			if(tableRows.size() > rowId * 2 + 1){
-				captionCells = tableRows.get(rowId * 2 + 1).findElements(By.tagName("td"));
-				logger.debug("GalleryImages - number of caption cells: " + captionCells.size());
-			}
-
-			galleryImageRows.add(new ArrayList<GalleryImage>());
-
-			// loop table cells in row
-			for(int cellId = 0; cellId < imageCells.size(); cellId++) {
-				logger.debug("cellId:" + cellId);
-				WebElement imageCell = imageCells.get(cellId);
-				WebElement captionCell = null;
-				if(captionCells != null && captionCells.size() > cellId){
-					captionCell = captionCells.get(cellId);
-					wait.until(new AllTrue(
-							new ChildElementVisible(imageCell, By.tagName("img")),
-							new ChildElementVisible(captionCell, By.tagName("dl"))
-					));
-
-				} else {
-					wait.until(new ChildElementVisible(imageCell, By.tagName("img")));
-				}
-				galleryImageRows.get(rowId).add(new GalleryImage(imageCell, captionCell));
-			}
-
-		}
-
-		return galleryImageRows;
-	}
+    public static final Logger logger = Logger.getLogger(TaxonSearchResultPage.class);
+
+    private static String drupalPagePathBase = "cdm_dataportal/search/taxon";
+
+    @FindBy(id="search_results")
+    @CacheLookup
+    private WebElement searchResults;
+
+    //class=page_options
+    @FindBy(className="page_options")
+    @CacheLookup
+    private WebElement pageOptions;
+
+    //class=pager
+    @FindBy(className="pager")
+    @CacheLookup
+    private WebElement pager;
+
+
+    /* (non-Javadoc)
+     * @see eu.etaxonomy.dataportal.pages.PortalPage#getDrupalPageBase()
+     */
+    @Override
+    protected String getDrupalPageBase() {
+        return drupalPagePathBase;
+    }
+
+    /**
+     * @param driver
+     * @param context
+     * @throws Exception
+     */
+    public TaxonSearchResultPage(WebDriver driver, DataPortalContext context) throws Exception {
+        super(driver, context);
+    }
+
+
+    /**
+     * Find and return the result n-th item of the result list.
+     * The item can be specified by the index paramter.
+     * @param index 1-based index to identify the resultset item.
+     * This index will be used in a xpath query.
+     * @return
+     */
+    public TaxonListElement getResultItem(int index) {
+
+        TaxonListElement entry = new TaxonListElement(searchResults.findElement(By.xpath("ul/li[" + index + "]")));
+
+        return entry;
+    }
+
+    /**
+     * Find and returns all items of the result list.
+     * @return
+     */
+    public List<TaxonListElement> getResultItems() {
+
+        List<WebElement> entryList = searchResults.findElements(By.xpath("/ul/li"));
+        List<TaxonListElement> taxonListElements = new ArrayList<TaxonListElement>();
+        for(WebElement entry : entryList){
+            taxonListElements.add(new TaxonListElement(entry));
+        }
+        return taxonListElements;
+    }
+
+    /**
+     * @throws Exception
+     *
+     */
+    @SuppressWarnings("unchecked")
+    public <T extends PortalPage> T  clickTaxonName(TaxonListElement taxonListElement, Class<T> pageClass) throws Exception {
+
+        LinkElement taxonlink = new LinkElement(taxonListElement.getElement().findElement(By.tagName("a")));
+        logger.debug("taxonlink to click: " + taxonlink.toString() + " [" + taxonlink.getElement().toString() + "]");
+        return (T) clickLink(taxonlink, new VisibilityOfElementLocated(By.id("featureTOC")), pageClass, 2l, TimeUnit.MINUTES);
+
+    }
+
+    /**
+     * @return a two dimensional array representing the media items in the gallery, or null if no gallery exists.
+     */
+    public List<List<GalleryImage>> getGalleryImagesOf(TaxonListElement taxonListElement) {
+
+
+        WebElement gallery = taxonListElement.getElement().findElement(By.className("media_gallery"));
+
+        if( gallery == null){
+            return null;
+        }
+
+        ArrayList<List<GalleryImage>> galleryImageRows = new ArrayList<List<GalleryImage>>();
+
+        List<WebElement> tableRows = gallery.findElements(By.tagName("tr"));
+        logger.debug("GalleryImages - total rows " + tableRows.size());
+        // loop table rows
+        for(int rowId = 0; rowId * 2 < tableRows.size() && tableRows.size() > 0; rowId++ ){
+            logger.debug("GalleryImages - gallery row " + rowId );
+            List<WebElement> imageCells = tableRows.get(rowId * 2).findElements(By.tagName("td"));
+            logger.debug("GalleryImages - number of image cells: " + imageCells.size());
+            List<WebElement> captionCells = null;
+            if(tableRows.size() > rowId * 2 + 1){
+                captionCells = tableRows.get(rowId * 2 + 1).findElements(By.tagName("td"));
+                logger.debug("GalleryImages - number of caption cells: " + captionCells.size());
+            }
+
+            galleryImageRows.add(new ArrayList<GalleryImage>());
+
+            // loop table cells in row
+            for(int cellId = 0; cellId < imageCells.size(); cellId++) {
+                logger.debug("cellId:" + cellId);
+                WebElement imageCell = imageCells.get(cellId);
+                WebElement captionCell = null;
+                if(captionCells != null && captionCells.size() > cellId){
+                    captionCell = captionCells.get(cellId);
+                    wait.until(new AllTrue(
+                            new ChildElementVisible(imageCell, By.tagName("img")),
+                            new ChildElementVisible(captionCell, By.tagName("dl"))
+                    ));
+
+                } else {
+                    wait.until(new ChildElementVisible(imageCell, By.tagName("img")));
+                }
+                galleryImageRows.get(rowId).add(new GalleryImage(imageCell, captionCell));
+            }
+
+        }
+
+        return galleryImageRows;
+    }
 
 
 
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/JUnitWebDriverWait.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/JUnitWebDriverWait.java
index 01f3ae62..8a1b9936 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/JUnitWebDriverWait.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/JUnitWebDriverWait.java
@@ -13,17 +13,17 @@ import org.openqa.selenium.support.ui.WebDriverWait;
 public class JUnitWebDriverWait extends WebDriverWait {
 
 
-	/**
-	 * @param driver
-	 * @param timeOutInSeconds
-	 */
-	public JUnitWebDriverWait(WebDriver driver, long timeOutInSeconds) {
-		super(driver, timeOutInSeconds);
-	}
+    /**
+     * @param driver
+     * @param timeOutInSeconds
+     */
+    public JUnitWebDriverWait(WebDriver driver, long timeOutInSeconds) {
+        super(driver, timeOutInSeconds);
+    }
 
-	@Override
-	protected RuntimeException timeoutException(String message, RuntimeException lastException) {
-	    throw new AssertionError(message);
-	 }
+    @Override
+    protected RuntimeException timeoutException(String message, Throwable lastException) {
+        throw new AssertionError(message);
+     }
 
 }
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java
index 65747a9d..5ce49baa 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java
@@ -4,6 +4,7 @@
 package eu.etaxonomy.dataportal.selenium;
 
 import java.io.IOException;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.log4j.Logger;
 import org.openqa.selenium.WebDriver;
@@ -33,6 +34,9 @@ public class WebDriverFactory {
     private static final String FIREXPATH_VERSION = "0.9.7";
     private static final String DISABLE_ADD_ON_COMPATIBILITY_CHECKS_VERSION = "1.3";
 
+    private static final long IMPLICIT_WAIT_DEFAULT = 5;
+
+
     public static WebDriver newWebDriver() {
 
         WebDriver newDriver = null;
@@ -51,11 +55,16 @@ public class WebDriverFactory {
                 newDriver = initInternetExplorerDriver();
                 break;
             }
+
         } catch (NullPointerException e) {
             SystemUtils.handleInvalidSystemProperty(SYSTEM_PROPERTY_NAME_BROWSER, e);
         } catch (IllegalArgumentException e) {
             SystemUtils.handleInvalidSystemProperty(SYSTEM_PROPERTY_NAME_BROWSER, e);
         }
+
+        newDriver.manage().timeouts().implicitlyWait(IMPLICIT_WAIT_DEFAULT, TimeUnit.SECONDS);
+        logger.info("Implicit wait set to : " + IMPLICIT_WAIT_DEFAULT + TimeUnit.SECONDS);
+
         return newDriver;
     }
 
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java
index 5804202a..9f67e54a 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/cichorieae/CichorieaeSearchTest.java
@@ -35,65 +35,65 @@ import eu.etaxonomy.dataportal.selenium.VisibilityOfElementLocated;
 @DataPortalContexts( { DataPortalContext.cichorieae })
 public class CichorieaeSearchTest extends CdmDataPortalTestBase {
 
-	private static GenericPortalPage homePage = null;
+    private static GenericPortalPage homePage = null;
 
-	@Before
-	public void setUp() throws Exception {
+    @Before
+    public void setUp() throws Exception {
 
-		driver.get(getContext().getBaseUri().toString());
-		homePage = new GenericPortalPage(driver, getContext());
+        driver.get(getContext().getBaseUri().toString());
+        homePage = new GenericPortalPage(driver, getContext());
 
-	}
+    }
 
-	@Test
-	public void testSearchLCommunis() throws Exception {
+    @Test
+    public void testSearchLCommunis() throws Exception {
 
-		TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
+        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
 
-		assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
+        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
 
-		TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
+        TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
 
-		assertEquals("Lapsana communis L., Sp. Pl.: 811. 1753", lapsanaCommunnis.getFullTaxonName());
+        assertEquals("Lapsana communis L., Sp. Pl.: 811. 1753", lapsanaCommunnis.getFullTaxonName());
 
-		WebElement nameElement = lapsanaCommunnis.getElement().findElement(By.className("BotanicalName"));
+        WebElement nameElement = lapsanaCommunnis.getElement().findElement(By.className("BotanicalName"));
 
-		WebElement namePart1 = nameElement.findElement(By.xpath("span[1]"));
-		Assert.assertEquals("Lapsana", namePart1.getText());
-		Assert.assertEquals("italic", namePart1.getCssValue("font-style"));
+        WebElement namePart1 = nameElement.findElement(By.xpath("span[1]"));
+        Assert.assertEquals("Lapsana", namePart1.getText());
+        Assert.assertEquals("italic", namePart1.getCssValue("font-style"));
 
-		WebElement namePart2 = nameElement.findElement(By.xpath("span[2]"));
-		Assert.assertEquals("communis", namePart2.getText());
-		Assert.assertEquals("italic", namePart2.getCssValue("font-style"));
+        WebElement namePart2 = nameElement.findElement(By.xpath("span[2]"));
+        Assert.assertEquals("communis", namePart2.getText());
+        Assert.assertEquals("italic", namePart2.getCssValue("font-style"));
 
-		WebElement authorPart = nameElement.findElement(By.xpath("span[3]"));
-		Assert.assertEquals("L.", authorPart.getText());
-		Assert.assertEquals("normal", authorPart.getCssValue("font-style"));
+        WebElement authorPart = nameElement.findElement(By.xpath("span[3]"));
+        Assert.assertEquals("L.", authorPart.getText());
+        Assert.assertEquals("normal", authorPart.getCssValue("font-style"));
 
-		WebElement referenceElement = lapsanaCommunnis.getElement().findElement(By.className("reference"));
-		Assert.assertEquals("Sp. Pl.: 811. 1753", referenceElement.findElement((By.className("reference"))).getText());
+        WebElement referenceElement = lapsanaCommunnis.getElement().findElement(By.className("reference"));
+        Assert.assertEquals("Sp. Pl.: 811. 1753", referenceElement.findElement((By.className("reference"))).getText());
 
-		PortalPage taxonProfilLapsanaCommunnis = searchResultPage.clickTaxonName(lapsanaCommunnis);
-		assertEquals(getContext().prepareTitle("Lapsana communis"), taxonProfilLapsanaCommunnis.getTitle());
-	}
+        PortalPage taxonProfilLapsanaCommunnis = searchResultPage.clickTaxonName(lapsanaCommunnis, PortalPage.class);
+        assertEquals(getContext().prepareTitle("Lapsana communis"), taxonProfilLapsanaCommunnis.getTitle());
+    }
 
-	@Test
-	public void testSearchLCommunis_ImageLinks() throws Exception {
+    @Test
+    public void testSearchLCommunis_ImageLinks() throws Exception {
 
-		TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
+        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Lapsana com*");
 
-		assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
+        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
 
-		TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
+        TaxonListElement lapsanaCommunnis = searchResultPage.getResultItem(1);
 
-		List<List<GalleryImage>> galleryImageRows = searchResultPage.getGalleryImagesOf(lapsanaCommunnis);
+        List<List<GalleryImage>> galleryImageRows = searchResultPage.getGalleryImagesOf(lapsanaCommunnis);
 
-		assertEquals("Expecting one row of images", 1, galleryImageRows.size());
-		assertEquals("Expecting 4 images in row", 4, galleryImageRows.get(0).size());
+        assertEquals("Expecting one row of images", 1, galleryImageRows.size());
+        assertEquals("Expecting 4 images in row", 4, galleryImageRows.get(0).size());
 
-		GalleryImage firstImage = galleryImageRows.get(0).get(0);
-		assertNull("caption should be off", firstImage.getCaptionText());
-		searchResultPage.clickLink(firstImage.getImageLink(), new VisibilityOfElementLocated(By.id("images")), GenericPortalPage.class);
-	}
+        GalleryImage firstImage = galleryImageRows.get(0).get(0);
+        assertNull("caption should be off", firstImage.getCaptionText());
+        searchResultPage.clickLink(firstImage.getImageLink(), new VisibilityOfElementLocated(By.id("images")), GenericPortalPage.class);
+    }
 
 }
diff --git a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java
index efbce2ca..dbbdc12d 100644
--- a/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java
+++ b/7.x/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/test/java/eu/etaxonomy/dataportal/selenium/tests/flMalesiana/FloraMalesiana_OriginalSourceTest.java
@@ -15,6 +15,7 @@ import java.net.MalformedURLException;
 import java.util.List;
 import java.util.UUID;
 
+import org.apache.log4j.Level;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -43,85 +44,46 @@ import eu.etaxonomy.dataportal.pages.TaxonSearchResultPage;
 @DataPortalContexts( { DataPortalContext.floramalesiana})
 public class FloraMalesiana_OriginalSourceTest extends CdmDataPortalTestBase{
 
-	// Milichia speciosa
-	static UUID taxonUuid = UUID.fromString("1f1f8356-a172-4f7d-ad98-e8a37489ce9f");
-
-	TaxonProfilePage p = null;
-
-	private GenericPortalPage homePage;
-
-	@Before
-	public void setUp() throws Exception {
-
-		driver.get(getContext().getBaseUri().toString());
-		homePage = new GenericPortalPage(driver, getContext());
-
-	}
-
-	@After
-	public void tearDown(){
-		logger.debug("@After");
-	}
-
-
-	@Test
-	public void Illicium() throws Exception {
-
-		TaxonSearchResultPage searchResultPage = homePage.submitQuery("Illicium");
-
-		assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
-
-		TaxonListElement entryIillicium = searchResultPage.getResultItem(1);
-
-		assertEquals("Illicium L. in Syst. Nat. ed. 10: 1050. 1759", entryIillicium.getFullTaxonName());
-
-		PortalPage taxonProfileIillicium = searchResultPage.clickTaxonName(entryIillicium);
-
-//		assertNull("Authorship information should be hidden", p.getAuthorInformationText());
-//
-//		List<LinkElement> primaryTabs = p.getPrimaryTabs();
-//		assertEquals("Expecting 3 tabs", 3, primaryTabs.size());
-//		assertEquals("General", primaryTabs.get(0).getText());
-//		assertEquals("Nomenclature", primaryTabs.get(1).getText());
-//		assertEquals("Specimens", primaryTabs.get(2).getText());
-//
-//		assertEquals("Content", p.getTableOfContentHeader());
-//		List<LinkElement> tocLinks = p.getTableOfContentLinks();
-//		assertNotNull("Expecting a list of TOC links in the profile page.", tocLinks);
-//
-//		p.testTableOfContentEntry(0, "Citations", "citation");
-//		p.testTableOfContentEntry(1, "Distribution", "distribution");
-//		p.testTableOfContentEntry(2, "Occurrence", "occurrence");
-//
-//		FeatureBlock featureBlock = p.getFeatureBlockAt(0, "citation", "ul", "li");
-//		assertEquals("expecting no footnote keys", 0, featureBlock.getFootNoteKeys().size());
-//
-//		List<WebElement> listElements = featureBlock.getElement().findElements(By.tagName("li"));
-//		assertEquals("Expecting 48 listElements tags in \"Citations\"", 48, listElements.size());
-//
-//		// ---
-//		assertEquals("Argyrites speciosa (Meigen, 1830): Croatia", listElements.get(0).getText());
-//		List<WebElement> anchorTags = listElements.get(0).findElements(By.tagName("a"));
-//		assertEquals("Expecting one link", 1, anchorTags.size());
-//		assertTrue(anchorTags.get(0).getAttribute("href").endsWith("?q=cdm_dataportal/name/8d117f24-c9ba-44cd-bf9a-54f2b41e4a0f"));
-//
-//		// ---
-//		assertEquals("Milichia speciosa Meigen, 1830: type information (Becker 1902: 314)", listElements.get(2).getText());
-//		anchorTags = listElements.get(2).findElements(By.tagName("a"));
-//		assertEquals("Expecting two links", 2, anchorTags.size());
-//		assertEquals("Milichia speciosa Meigen, 1830", anchorTags.get(0).getText());
-//		assertTrue(anchorTags.get(0).getAttribute("href").endsWith("?q=cdm_dataportal/name/031ab38f-54a7-4012-8595-31929a6f7f45"));
-//		assertEquals("Becker 1902", anchorTags.get(1).getText());
-//		assertTrue(anchorTags.get(1).getAttribute("href").endsWith("?q=cdm_dataportal/reference/96d55a98-4811-4ad9-94d2-a306a212070b"));
-//
-//		// ---
-//		assertEquals("Milichia speciosa Meigen, 1830: checklist, Italy (Canzoneri & Gorodkov & Krivosheina & Munari & Nartshuk & Papp & Süss 1995: 25)", listElements.get(9).getText());
-//		anchorTags = listElements.get(9).findElements(By.tagName("a"));
-//		assertEquals("Expecting two links", 2, anchorTags.size());
-//		assertEquals("Milichia speciosa Meigen, 1830", anchorTags.get(0).getText());
-//		assertTrue(anchorTags.get(0).getAttribute("href").endsWith("?q=cdm_dataportal/name/031ab38f-54a7-4012-8595-31929a6f7f45"));
-//		assertEquals("Canzoneri & Gorodkov & Krivosheina & Munari & Nartshuk & Papp & Süss 1995", anchorTags.get(1).getText());
-//		assertTrue(anchorTags.get(1).getAttribute("href").endsWith("?q=cdm_dataportal/reference/338a6b6b-a26a-43e9-bf4a-6077b5a84668"));
-	}
+    private GenericPortalPage homePage;
+
+    @Before
+    public void setUp() throws Exception {
+
+        driver.get(getContext().getBaseUri().toString());
+        homePage = new GenericPortalPage(driver, getContext());
+    }
+
+    @After
+    public void tearDown(){
+        logger.debug("@After");
+    }
+
+
+    @Test
+    public void Illicium() throws Exception {
+
+        TaxonSearchResultPage searchResultPage = homePage.submitQuery("Illicium");
+
+        assertEquals(getContext().prepareTitle("Search results"), searchResultPage.getTitle());
+
+        logger.debug("getting first result entry");
+        TaxonListElement entryIillicium = searchResultPage.getResultItem(1);
+
+        logger.debug("checking FullTaxonName of first entry: " + entryIillicium.getElement().toString());
+        assertEquals("Illicium L. in Syst. Nat. ed. 10: 1050. 1759", entryIillicium.getFullTaxonName());
+
+        logger.debug("clicking TaxonName" + entryIillicium.getElement().toString());
+        TaxonProfilePage taxonProfileIillicium = searchResultPage.clickTaxonName(entryIillicium, TaxonProfilePage.class);
+
+//        assertNull("Authorship information should be hidden", taxonProfileIillicium.getAuthorInformationText());  // FF WebDriver hangs here
+
+        List<LinkElement> primaryTabs = taxonProfileIillicium.getPrimaryTabs();
+        assertEquals("Expecting 4 tabs", 4, primaryTabs.size());
+        assertEquals("General", primaryTabs.get(0).getText());
+        assertEquals("Synonymy", primaryTabs.get(1).getText());
+        assertEquals("Specimens", primaryTabs.get(2).getText());
+        assertEquals("Keys", primaryTabs.get(3).getText());
+
+    }
 
 }
