I am upgrading Selenium 3 to Selenium 4. One of the features in Selenium 4, is that DesriredCapabilities is deprecated. In some of the forms, it is mentioned that we can continue to use the deprecated class. Still, it is recommended we use browser-specific options e.g., ChromeOptions, FirefoxOptions, etc.
My question is, is there a way we can simplify the initialization of browser options and set the various capabilities for each of the browsers?
I see there is an abstract parent class AbstractDriverOtions used to declare the object and then instantiated separately as below. But is there a better way of implementing this?
