0

I am trying to open incognito/private window Chrome by Automation code. I am using C# and Testproject ro run my code. Does anyone here have any experience with this, can explain to me what I can do? thank you so much

Jin
  • 1,259
  • 1
  • 12
  • 24
  • @Pieterjan No, I don't developing an angular app. Currently I am coding by Visual Studio code, and use C# programming language + testproject – Jin Jun 14 '21 at 08:06
  • Do you want it to be incognito when recording too? – Costa Jun 14 '21 at 08:36
  • If there is no way to do that, you can try to open standart chrome by Process.Start("chrome path"); after that you can use SendKeys.SendWait("^+(N)"); By the way ^ equals to CTRL and + equals to Shift :) I hope it is useful for you. – cbalakus Jun 14 '21 at 08:44
  • @cbalakus I am using C# and testproject so I do not have Sendkeys to do like that =(( – Jin Jun 14 '21 at 08:57
  • @Costa No, I just want only perform when I run automation – Jin Jun 14 '21 at 08:59

1 Answers1

0

Try this, make a new job and click "Set Driver Desired Capabilities" (5th button) then make sure to pass "--incognito" in the arguments like this:

{
    "browserName": "chrome",
    "version": 83,
    "goog:chromeOptions": {
        "args": [
            "--incognito"
        ]
    }
}
Costa
  • 1,794
  • 1
  • 12
  • 21