How do I run a Selenium script in incognito mode?

How do I run a Selenium script in incognito mode?

Usually, we have two different ways for executing the Selenium Test using Incognito Mode for your Chrome Browser. You need to Right Click directly on Google Chrome. Then choose Properties. You should add an –incognito v in the “Target’ field right where the program path ends. We can now execute the incognito browser.