How to open incognito/private window Chrome By C# Test project automation

467 Views Asked by At

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

1

There are 1 best solutions below

0
On

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"
        ]
    }
}