Driver Script Constructor

Hi,

 

In your Selenium Automation tutorial for keyword driven framework, we are using reflection class Method to invoke each method in the ActionKeywords and we are instantiating that class in the DriverScript constructor.

 

My question is if the constructor is called while instantiating a class then where are we doing that for DriverScript Class?

public DriverScript() throws NoSuchMethodException, SecurityException{
actionKeywords = new ActionKeywords();
//This will load all the methods of the class ‘ActionKeywords’ in it.
                //It will be like array of method, use the break point here and do the watch
method = actionKeywords.getClass().getMethods();
}
Please confirm my understanding and clarify.
Default Asked on September 24, 2018 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.