private void handleHidden ( FormInput input ) { String text = input . getInputValues ( ) . iterator ( ) . next ( ) . getValue ( ) ; if ( null == text || text . length ( ) == 0 ) { return ; } WebElement inputElement = browser . getWebElement ( input . getIdentification ( ) ) ; JavascriptExecutor js = ( JavascriptExecutor ) browser . getWebDriver ( ) ; js . executeScript ( "arguments[0].setAttribute(arguments[1], arguments[2]);" , inputElement , "value" , text ) ; }
Enter information into the hidden input field .