mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/observation/ObservationHelper.java
public static WebElement findRelatedObservationSectionByType(WebElement panel, RelationshipTypeEnum type)
    {
        WebElement relatedObsPanel = ObservationHelper.grabRelatedObsPanel(panel);
        List<WebElement> relatedSectionPanels = ObservationHelper.grabRelatedObservationSectionPanels(relatedObsPanel);
        
        WebElement panelToReturn = null;
        
        for (WebElement indivPanel : relatedSectionPanels)
        {
            WebElement panelHeader = indivPanel.findElement(By.cssSelector("span[id$='relationHeader']"));
            assertThat(panelHeader, notNullValue());
            
            if (panelHeader.getText().equals(type.toString().toUpperCase()))
            {
                panelToReturn = indivPanel;
                break;
            }
        }
        
        assertThat(String.format("Could not find relationship section for type %s", type), 
                panelToReturn, notNullValue());
        return panelToReturn;
    }
/**
     * Finds the panel of the related observations section that matches the given type.
     * @param panel
     *  the panel to search for the relation section
     * @param type
     *  the relationship type that corresponds to the section that should be grabbed
     * @return
     *  the web element that is the section based on the given relationship type
     */
Finds the panel of the related observations section that matches the given type.
@param panel
the panel to search for the relation section
@param type
the relationship type that corresponds to the section that should be grabbed
@return
the web element that is the section based on the given relationship type
Finds the panel of the related observations section that matches the given type . @param panel the panel to search for the relation section @param type the relationship type that corresponds to the section that should be grabbed @return the web element that is the section based on the given relationship type
public static WebElement findRelatedObservationSectionByType(WebElement panel, RelationshipTypeEnum type)
    {
        WebElement relatedObsPanel = ObservationHelper.grabRelatedObsPanel(panel);
        List<WebElement> relatedSectionPanels = ObservationHelper.grabRelatedObservationSectionPanels(relatedObsPanel);
        WebElement panelToReturn = null;
        for (WebElement indivPanel : relatedSectionPanels)
        {
            WebElement panelHeader = indivPanel.findElement(By.cssSelector("span[id$='relationHeader']"));
            assertThat(panelHeader, notNullValue());
            if (panelHeader.getText().equals(type.toString().toUpperCase()))
            {
                panelToReturn = indivPanel;
                break;
            }
        }
        assertThat(String.format("Could not find relationship section for type %s", type), 
                panelToReturn, notNullValue());
        return panelToReturn;
    }
public static WebElement findRelatedObservationSectionByType ( WebElement panel , RelationshipTypeEnum type ) { WebElement relatedObsPanel = ObservationHelper . grabRelatedObsPanel ( panel ) ; List < WebElement > relatedSectionPanels = ObservationHelper . grabRelatedObservationSectionPanels ( relatedObsPanel ) ; WebElement panelToReturn = null ; for ( WebElement indivPanel : relatedSectionPanels ) { WebElement panelHeader = indivPanel . findElement ( By . cssSelector ( "span[id$='relationHeader']" ) ) ; assertThat ( panelHeader , notNullValue ( ) ) ; if ( panelHeader . getText ( ) . equals ( type . toString ( ) . toUpperCase ( ) ) ) { panelToReturn = indivPanel ; break ; } } assertThat ( String . format ( "Could not find relationship section for type %s" , type ) , panelToReturn , notNullValue ( ) ) ; return panelToReturn ; }
Finds the panel of the related observations section that matches the given type.
Finds the panel of the related observations section that matches the given type .