JMeter: In jp@gc Webdriver Sampler, how to launch the chrome browser in incognito mode

27 Views Asked by At

Using jp@gc Webdriver Sampler, I am trying to get the Microsoft AD user oauth2.0 authorization code. I need to launch the browser in incognito mode in order make sure that is does not use my SSO instead uses test user login. How do I launch the browser in incognito mode?

I tried to add options 'ChromeOptions options = new ChromeOptions(); options.addArguments("incognito");' under additional arguments in options tab of chrome driver congig

1

There are 1 best solutions below

0
Ivan G On

You need to just provide --incognito to "Additional arguments" input like this

When it comes to the overall approach I don't think using a real browser is a good solution, you should be able to bypass OAuth2 authentication using "normal" JMeter HTTP Request samplers, it should be a matter of a simple (or not very simple) correlation

You can take a look at atlassian-microsoft-oauth.jmx example test plan to see how it can be done.