Closed dhodyrahmad closed 1 year ago
Hi, I don't think this will work because Selenium can only fill elements that a user with a browser can fill.
A solution would be to make the field not hidden, or to execute some Javascript to fill the element. Example:
j.executeScript("document.getElementById('password').value='pass';");
Hi, need help with command zap here. I want to this zap auth work on my pipeline. In my case I want to authenticate to login page that has hidden password field. So the flow are fill in username (with hidden password field) > continue button > fill in password > login button. This flow work on the same page without changing to other page.
My command
zap-baseline.py -I -j -t "https://url.co.id" --hook=/zap/auth_hook.py -J zap-$CI_PROJECT_NAME-report.json -r zap-$CI_PROJECT_NAME-report.html -x zap-$CI_PROJECT_NAME-report.xml -z 'auth.loginurl="https://url.co.id/login" auth.username="username" auth.password="password" auth.exclude="https://url.co.id/logout" auth.first_submit_field="Continue" auth.username_field="email" auth.password_field="password" auth.submit_field="LOGIN"'
My Output