1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2011 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.dataportal;
|
11
|
|
12
|
import java.util.ArrayList;
|
13
|
import java.util.List;
|
14
|
|
15
|
import org.openqa.selenium.By;
|
16
|
import org.openqa.selenium.WebElement;
|
17
|
|
18
|
import eu.etaxonomy.dataportal.elements.BaseElement;
|
19
|
import eu.etaxonomy.dataportal.elements.LinkElement;
|
20
|
|
21
|
/**
|
22
|
* @author andreas
|
23
|
* @date Sep 16, 2011
|
24
|
*
|
25
|
*/
|
26
|
public class ElementUtils {
|
27
|
|
28
|
/**
|
29
|
* @param fnListElements
|
30
|
* @return
|
31
|
*/
|
32
|
public static List<BaseElement> baseElementsFromFootNoteListElements(List<WebElement> fnListElements) {
|
33
|
List<BaseElement> footNotes = new ArrayList<BaseElement>();
|
34
|
for(WebElement fn : fnListElements) {
|
35
|
footNotes.add(new BaseElement(fn));
|
36
|
}
|
37
|
return footNotes;
|
38
|
}
|
39
|
|
40
|
/**
|
41
|
* @param fnkListElements
|
42
|
* @return
|
43
|
*/
|
44
|
public static List<LinkElement> linkElementsFromFootNoteKeyListElements(List<WebElement> fnkListElements) {
|
45
|
List<LinkElement> footNoteKeys = new ArrayList<LinkElement>();
|
46
|
for(WebElement fnk : fnkListElements) {
|
47
|
footNoteKeys.add(new LinkElement(fnk));
|
48
|
}
|
49
|
return footNoteKeys;
|
50
|
}
|
51
|
|
52
|
}
|