Interoperability among Proxy/Selenium scripts

33 views
Skip to first unread message

Tyler Rosonke

unread,
May 5, 2020, 5:42:12 PM5/5/20
to OWASP ZAP Scripts
Hi,

I have a use case where I want to interact with the Selenium webdriver when a request goes through the proxy. 
I've been able to work with requests/responses going through the proxy using proxyRequest(msg)/proxyResponse(msg) from the built-in template, but I'm not sure how (or if it's possible) to interact with the Selenium webdriver from that context.

Any help or input would be greatly appreciated!

Thanks,
Tyler

thc...@gmail.com

unread,
May 5, 2020, 5:47:10 PM5/5/20
to zaproxy...@googlegroups.com
Hi.

You could set the WebDriver in a global custom variable in the Selenium
script and then access it in the Proxy script.

https://www.zaproxy.org/docs/desktop/addons/script-console/#custom-globalscript-variables

Best regards.

Tyler Rosonke

unread,
May 5, 2020, 6:01:32 PM5/5/20
to OWASP ZAP Scripts
Ahhh, that clicked. That makes sense! I will mess with that.

Thanks for the quick response!
Reply all
Reply to author
Forward
0 new messages