@ SuppressWarnings ( "unchecked" ) public Object runKeyword ( String keyword , final Object [ ] params ) { Map attributes = new HashMap ( ) ; attributes . put ( "args" , params ) ; try { ApplicationContextHolder . set ( context ) ; startJSpringBotKeyword ( keyword , attributes ) ; Object [ ] handledParams = argumentHandlers . handlerArguments ( keyword , params ) ; Object returnedValue = ( ( Keyword ) context . getBean ( keywordToBeanMap . get ( keyword ) ) ) . execute ( handledParams ) ; attributes . put ( "status" , "PASS" ) ; return returnedValue ; } catch ( Exception e ) { attributes . put ( "exception" , e ) ; attributes . put ( "status" , "FAIL" ) ; if ( SoftAssertManager . INSTANCE . isEnable ( ) ) { LOGGER . warn ( "[SOFT ASSERT]: (" + keyword + ") -> " + e . getMessage ( ) ) ; SoftAssertManager . INSTANCE . add ( keyword , e ) ; return null ; } else { throw new IllegalStateException ( e . getMessage ( ) , e ) ; } } finally { endJSpringBotKeyword ( keyword , attributes ) ; ApplicationContextHolder . remove ( ) ; } }
Implements the Robot Framework interface method run_keyword required for dynamic libraries .