I am new to these and I need a solution or idea how I can do it
I have the following code:
if (page.getId().equals("STEP_NAME_SUBMIT_OTP_FOR_TRANSACTION"))
emRequestResponse.setTagElementList(agent.getHeader().getTagElementList().getSTEP_NAME_SUBMIT_OTP_FOR_TRANSACTION());
else if (page.getId().equals("STEP_NAME_SUBMIT_CAPTCHA_FOR_LOGIN"))
emRequestResponse.setTagElementList(agent.getHeader().getTagElementList().getSTEP_NAME_SUBMIT_CAPTCHA_FOR_LOGIN());
I need a better way to call the method at run time based on the id, so if the name is STEP_NAME_SUBMIT_OTP_FOR_TRANSACTION I need to call the method getSTEP_NAME_SUBMIT_OTP_FOR_TRANSACTION and so on.
getXXXmethods return the same type? If so, what is that type?