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.net.URLEncoder;
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
    @FindBy(id = "registration")
40
    @CacheLookup
41
    private WebElement registrationElement;
42

    
43
    private RegistrationItemFull registrationItem;
44

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

    
54

    
55
    public RegistrationPage(WebDriver driver, DataPortalContext context, String httpID) throws MalformedURLException, UnsupportedEncodingException {
56
        super(driver, context, URLEncoder.encode(URLEncoder.encode(httpID, "UTF-8")));
57
    }
58

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

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

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

    
78

    
79

    
80

    
81

    
82

    
83

    
84
}
(4-4/7)