Project

General

Profile

« Previous | Next » 

Revision 720edc33

Added by Andreas Kohlbecker about 5 years ago

ref #8051 more tests for specimen types in the registration page

View differences:

src/main/java/eu/etaxonomy/dataportal/elements/RegistrationItem.java
8 8
*/
9 9
package eu.etaxonomy.dataportal.elements;
10 10

  
11
import java.util.ArrayList;
11 12
import java.util.List;
12 13

  
13 14
import org.openqa.selenium.By;
......
32 33
    }
33 34

  
34 35
    protected Style style = null;
35
    protected List<WebElement> specimenTypeDesignations;
36
    protected List<WebElement> nameTypeDesignations;
36
    protected List<BaseElement> specimenTypeDesignations;
37
    protected List<BaseElement> nameTypeDesignations;
37 38
    protected WebElement citation;
38 39
    protected WebElement metadata;
39 40
    protected WebElement identifier;
......
67 68
                }
68 69
            }
69 70
            try{
70
                specimenTypeDesignations = containerElement.findElements(By.cssSelector(".specimen_type_designation"));
71
                List<WebElement> std = containerElement.findElements(By.cssSelector(".specimen_type_designation"));
72
                specimenTypeDesignations = new ArrayList<BaseElement>(std.size());
73
                for(WebElement we : std){
74
                    specimenTypeDesignations.add(new BaseElement(we));
75
                }
71 76
            } catch (Exception e) { /* IGNORE */}
72 77
            try {
73
                nameTypeDesignations = containerElement.findElements(By.cssSelector(".name_type_designation"));
78
                List<WebElement> ntd = containerElement.findElements(By.cssSelector(".name_type_designation"));
79
                nameTypeDesignations = new ArrayList<BaseElement>(ntd.size());
80
                for(WebElement we : ntd){
81
                    nameTypeDesignations.add(new BaseElement(we));
82
                }
74 83
            } catch (Exception e) { /* IGNORE */}
75 84
            try {
76 85
                citation = containerElement.findElement(By.cssSelector(".citation"));

Also available in: Unified diff