How to start browser in incognito window using Pytest?

Is it possible to start browser in incognito window using Pytest?

Hi Richard,

In the desired capabilities you need to pass the chrome options as given below:

capabilities = {
                "build" : "your build name",
                "name" : "your test name",
                "platform" : "Windows 11",
                "browserName" : "Chrome",
                "version" : "103.0",
                "selenium_version" : "3.141.59",
                "chromeOptions" : {
                "args" : ["incognito"] 
      }