Hi all,
I'm also having trouble getting selenium to work in an authentication script (as described in this conversation:
https://groups.google.com/g/zaproxy-users/c/5uWTZim43aw/m/T75YACgDAgAJ).
For me it seems like selenium simply doesn't work in authentication scripts. Steps I have taken:
1. Wrote a standalone selenium script, that logs into Microsoft SSO, which works fine
2. Wrote an authentication script using selenium, following the instructions in the video mentioned above
3. Added a user, activated script-based authentication, activated forced user mode
4. Started the ajax spider
5. One browser is opened (ajax spider)
6. Authentication script is beeing called
The authentication function used in the script is:
function authenticate(helper, paramsValues, credentials) {
var selenium = org.parosproxy.paros.control.Control.getSingleton().
getExtensionLoader().getExtension(
org.zaproxy.zap.extension.selenium.ExtensionSelenium.class
);
var driver = selenium.getWebDriverProxyingViaZAP(1, 'firefox');
driver.get(ANY_URL_IN_SCOPE);
}
7. A browser window is opened which seems to load the defined url, but nothing happens. It just hangs.
8. Tried several times to solve this, but it always comes down to selenium not working in authentication script.
Can anyone help?
Kris