Webdriver Advance - Remove duplicate code by using inheritance