How to Solve NameError: name 'DesiredCapabilities' is not defined -- selenium

Solution: Import the 'DesiredCapabilities' module

To Solve the error, add the following line to the top of your code.

from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

 

For more information:
Python selenium DesiredCapabilities