In Hybrid Framework Reflection concept is not working | Selenium Forum

In Hybrid Framework Reflection concept is not working  | Selenium Forum

In Hybrid Framework Reflection concept is not working

In my framework project , i read the function name form excel file and execute the function through reflection concept .

try { Method method; method=app.getClass().getMethod(KeywordKey); method.invoke(app); }catch(Exception ex) { Throwable c=ex.getCause(); System.out.println(c.getMessage()); }

Above code is executed successfully for first "KeywordKey" but give nullpointerexception for second "KeywordKey"

NullPointerException comes when the code is not able to find the method(Function) name with the data specified in the method.invoke("function name")

We offer online selenium and UFT/QTP training. The course is very comprehensive and covers every aspect of automation testing with UFT/QTP and selenium. All types of frameworks are covered in depth - data driven framework, hybrid framework, page object model with a live project

© 2020 Whizdom Trainings. All rights Reserved - Powered by Whizdom Trainings

Recommended articles