Facing below error while working with chrome DesiredCapabilities.
The method chrome() is undefined for the type DesiredCapabilities.
Use ChromeOptions object and passed it to the ChromeDriver() constructor as the old method Capabilities is deprecated.
We not need to use options.merge(capabilities); instead, you can use options.setCapability(params, params). Or we can completely skip DesiredCapabilities and use only ChromeOptions with setCapability method like below:
If you are still facing issue, please do write it in comment section.