cdm-dataportal/modules/cdm_dataportal/test/java/dataportal-selenium-tests/src/main/java/eu/etaxonomy/dataportal/elements/LinkElement.java @ c22027c0
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 |
|
11 |
package eu.etaxonomy.dataportal.elements; |
12 |
|
13 |
import java.net.MalformedURLException; |
14 |
import java.net.URL; |
15 |
import java.util.Arrays; |
16 |
import java.util.List; |
17 |
|
18 |
import org.openqa.selenium.RenderedWebElement; |
19 |
|
20 |
/**
|
21 |
* @author andreas
|
22 |
* @date Jul 1, 2011
|
23 |
*
|
24 |
*/
|
25 |
public class LinkElement extends BaseElement { |
26 |
|
27 |
private URL url = null; |
28 |
public URL getUrl() { |
29 |
return url; |
30 |
}
|
31 |
|
32 |
public void setUrl(URL url) { |
33 |
this.url = url; |
34 |
}
|
35 |
|
36 |
|
37 |
public LinkElement(RenderedWebElement a) { |
38 |
|
39 |
super(a); |
40 |
|
41 |
// read src url
|
42 |
if (a.getAttribute("href") != null) { |
43 |
try { |
44 |
setUrl(new URL(a.getAttribute("href"))); |
45 |
} catch (MalformedURLException e) { |
46 |
// IGNORE //
|
47 |
}
|
48 |
}
|
49 |
|
50 |
}
|
51 |
|
52 |
}
|
- « Previous
- 1
- 2
- 3
- Next »