Explain how you would design a test automation framework from scratch using class objects and inheritance.