Project

General

Profile

Download (1 KB) Statistics
| Branch: | Tag: | Revision:
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.elements;
11

    
12
import org.openqa.selenium.By;
13
import org.openqa.selenium.NoSuchElementException;
14
import org.openqa.selenium.WebElement;
15

    
16

    
17
/**
18
 * @author andreas
19
 * @date Jul 4, 2011
20
 *
21
 */
22
public class DrupalBlock extends BaseElement {
23

    
24
	private String header;
25

    
26
	protected WebElement content;
27

    
28
	/**
29
	 * @param element
30
	 */
31
	public DrupalBlock(WebElement element) {
32

    
33
		super(element);
34

    
35
		content = element.findElement(By.className("content"));
36

    
37
		try {
38
			WebElement headerElement = element.findElement(By.tagName("h2"));
39
			header = headerElement.getText();
40
		} catch (NoSuchElementException e){
41
			// IGNORE //
42
		}
43
	}
44

    
45
	public String getHeader() {
46
		return header;
47
	}
48

    
49
	public WebElement getContent() {
50
		return content;
51
	}
52

    
53
}
(3-3/6)