Explain the core concepts of OOP and describe how you have achieved encapsulation specifically within an automation framework.