mil.dod.th.ose.gui.integration/src/mil/dod/th/ose/gui/integration/helpers/AssetCommandHelper.java
public static WebElement findCorrectSendButton(final WebDriver driver, final String assetName, 
            final String buttonText, final String buttonId)
    {
        WebElement assetCommandPanel = getAssetCommandPanel(driver, assetName);
        
        List<WebElement> buttons = assetCommandPanel.findElements(By.cssSelector(
                "button[role='button'][id$='" + buttonId + "'][aria-disabled='false']"));
        
        for (WebElement button : buttons)
        {
            if (button.getText().equals(buttonText))
            {
                return button;
            }
        }
        
        return null;
    }
/**
     * Function finds the correct button on the supplied asset command panel.
     * @param driver
     *  the web driver to use
     * @param assetName
     *  the name of the asset that the command is to be executed on.
     * @param buttonText
     *  the text of the button that needs to be found
     * @return
     *  null if the button cannot be found else the found button
     */
Function finds the correct button on the supplied asset command panel.
@param driver
the web driver to use
@param assetName
the name of the asset that the command is to be executed on.
@param buttonText
the text of the button that needs to be found
@return
null if the button cannot be found else the found button
Function finds the correct button on the supplied asset command panel . @param driver the web driver to use @param assetName the name of the asset that the command is to be executed on . @param buttonText the text of the button that needs to be found @return null if the button cannot be found else the found button
public static WebElement findCorrectSendButton(final WebDriver driver, final String assetName, 
            final String buttonText, final String buttonId)
    {
        WebElement assetCommandPanel = getAssetCommandPanel(driver, assetName);
        List<WebElement> buttons = assetCommandPanel.findElements(By.cssSelector(
                "button[role='button'][id$='" + buttonId + "'][aria-disabled='false']"));
        for (WebElement button : buttons)
        {
            if (button.getText().equals(buttonText))
            {
                return button;
            }
        }
        return null;
    }
public static WebElement findCorrectSendButton ( final WebDriver driver , final String assetName , final String buttonText , final String buttonId ) { WebElement assetCommandPanel = getAssetCommandPanel ( driver , assetName ) ; List < WebElement > buttons = assetCommandPanel . findElements ( By . cssSelector ( "button[role='button'][id$='" + buttonId + "'][aria-disabled='false']" ) ) ; for ( WebElement button : buttons ) { if ( button . getText ( ) . equals ( buttonText ) ) { return button ; } } return null ; }
Function finds the correct button on the supplied asset command panel.
Function finds the correct button on the supplied asset command panel .