Project

General

Profile

Download (2.04 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2019 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.dataportal.pages;
10

    
11
import java.io.UnsupportedEncodingException;
12
import java.net.MalformedURLException;
13
import java.util.Collections;
14
import java.util.UUID;
15

    
16
import org.apache.log4j.Logger;
17
import org.openqa.selenium.WebDriver;
18
import org.openqa.selenium.WebElement;
19
import org.openqa.selenium.support.CacheLookup;
20
import org.openqa.selenium.support.FindBy;
21

    
22
import eu.etaxonomy.dataportal.DataPortalContext;
23
import eu.etaxonomy.dataportal.elements.RegistrationItemFull;
24

    
25
/**
26
 * @author a.kohlbecker
27
 * @since Feb 4, 2019
28
 *
29
 */
30
public class RegistrationPage extends PortalPage {
31

    
32

    
33
    public static final Logger logger = Logger.getLogger(TaxonProfilePage.class);
34

    
35
    private UUID registrationUuid;
36

    
37
    protected static String drupalPagePathBase = "cdm_dataportal/registration";
38

    
39

    
40
    @FindBy(id = "registration")
41
    @CacheLookup
42
    private WebElement registrationElement;
43

    
44
    private RegistrationItemFull registrationItem;
45

    
46
    /**
47
     * @param driver
48
     * @param context
49
     * @throws Exception
50
     */
51
    public RegistrationPage(WebDriver driver, DataPortalContext context) throws Exception {
52
        super(driver, context);
53
    }
54

    
55

    
56
    public RegistrationPage(WebDriver driver, DataPortalContext context, String httpID) throws MalformedURLException, UnsupportedEncodingException {
57
        super(driver, context, null, Collections.singletonMap("identifier", httpID));
58
    }
59

    
60
    /**
61
     * {@inheritDoc}
62
     */
63
    @Override
64
    protected String getDrupalPageBase() {
65
        return drupalPagePathBase;
66
    }
67

    
68
    /**
69
     * @return the registrationItem
70
     */
71
    public RegistrationItemFull getRegistrationItem() {
72

    
73
        if(registrationItem == null){
74
            registrationItem = new RegistrationItemFull(registrationElement);
75
        }
76
        return registrationItem;
77
    }
78

    
79

    
80

    
81

    
82

    
83

    
84

    
85
}
(5-5/9)