OWASP ZAP API parameter to control maximum crawl depth
I'm trying to control the crawl depth of OWASP ZAP tool. I'm able to achieve it easily when using GUI mode.
However, while accessing through python API, I'm unable to do so.
I have tried setting the parameter as spider.setOptionMaxDepth = 1 and tried initiation spider. However it isn't taking the crawl depth I set. I have also tried setting the other parameter "spider.optionMaxDepth" = 1 without any luck. Please suggest me the correct parameter name or the syntax to be used to control crawl depth via Python API.
Thats the right parameter.
Can you report this as an issue together with full details of what you're doing and why you think it isnt working as you expect: https://github.com/zaproxy/zaproxy/issues/new?template=Bug_report.md
For the python API client I believe the method names use underscores: