mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/observation/ObservationHelper.java
private static void verifyObservationInformation(WebElement panel, ExpectedObservation observation)
    {
        //get picture and mime type (mime type is only for the heading in the expanded content. 
        //does not correspond to link!)
        if (observation.isDigitalMedia())
        {
            WebElement type = panel.findElement(By.cssSelector("span[id$='mimeType']"));
            assertThat(type.getText(), is(observation.getMimeType()));
        }
        
        WebElement heading = panel.findElement(By.cssSelector("span[id$='obsHeader']"));
        assertThat(heading.getText(), is(observation.getObservationHeading()));
        
        WebElement pic = panel.findElement(By.cssSelector("img[id$='pic']"));
        String source = pic.getAttribute("src");
        String found = ImageHelper.getPictureOrIconName(source, ".png");
        
        assertThat(found, is(observation.retrieveObservationTypeEnumImage()));
        
        WebElement obsData = panel.findElement(By.cssSelector("span[id$='obsData']"));
        assertThat(obsData.getText().isEmpty(), is(false));
        
        for (String data : observation.getObsData())
        {
            assertThat("Missing: " + data, obsData.getText().contains(data), is(true));
        }
    }
/**
     * Function to verify displayed observation information. This function assumes that the passed in 
     * observation does not contain any detection data.
     */
Function to verify displayed observation information. This function assumes that the passed in
observation does not contain any detection data.
Function to verify displayed observation information . This function assumes that the passed in observation does not contain any detection data .
private static void verifyObservationInformation(WebElement panel, ExpectedObservation observation)
    {
        if (observation.isDigitalMedia())
        {
            WebElement type = panel.findElement(By.cssSelector("span[id$='mimeType']"));
            assertThat(type.getText(), is(observation.getMimeType()));
        }
        WebElement heading = panel.findElement(By.cssSelector("span[id$='obsHeader']"));
        assertThat(heading.getText(), is(observation.getObservationHeading()));
        WebElement pic = panel.findElement(By.cssSelector("img[id$='pic']"));
        String source = pic.getAttribute("src");
        String found = ImageHelper.getPictureOrIconName(source, ".png");
        assertThat(found, is(observation.retrieveObservationTypeEnumImage()));
        WebElement obsData = panel.findElement(By.cssSelector("span[id$='obsData']"));
        assertThat(obsData.getText().isEmpty(), is(false));
        for (String data : observation.getObsData())
        {
            assertThat("Missing: " + data, obsData.getText().contains(data), is(true));
        }
    }
private static void verifyObservationInformation ( WebElement panel , ExpectedObservation observation ) { if ( observation . isDigitalMedia ( ) ) { WebElement type = panel . findElement ( By . cssSelector ( "span[id$='mimeType']" ) ) ; assertThat ( type . getText ( ) , is ( observation . getMimeType ( ) ) ) ; } WebElement heading = panel . findElement ( By . cssSelector ( "span[id$='obsHeader']" ) ) ; assertThat ( heading . getText ( ) , is ( observation . getObservationHeading ( ) ) ) ; WebElement pic = panel . findElement ( By . cssSelector ( "img[id$='pic']" ) ) ; String source = pic . getAttribute ( "src" ) ; String found = ImageHelper . getPictureOrIconName ( source , ".png" ) ; assertThat ( found , is ( observation . retrieveObservationTypeEnumImage ( ) ) ) ; WebElement obsData = panel . findElement ( By . cssSelector ( "span[id$='obsData']" ) ) ; assertThat ( obsData . getText ( ) . isEmpty ( ) , is ( false ) ) ; for ( String data : observation . getObsData ( ) ) { assertThat ( "Missing: " + data , obsData . getText ( ) . contains ( data ) , is ( true ) ) ; } }
Function to verify displayed observation information.
Function to verify displayed observation information .
//get picture and mime type (mime type is only for the heading in the expanded content.  //does not correspond to link!)