ICTU / zap2docker-auth-weekly

Zap baseline scanner in Docker with authentication
Apache License 2.0
104 stars 72 forks source link

Login button and find_by_name #3

Closed jmtaillant closed 6 years ago

jmtaillant commented 6 years ago

Hi,

In the code you use driver.find_element_by_name(auth_first_submit_field_name).click() and driver.find_element_by_name(auth_submit_field_name).click()

for login procedure. It could be good in case the button use "id" instead of "name" property to try catch it and try to use:

driver.find_element_by_id(auth_first_submit_field_name).click() and driver.find_element_by_id(auth_submit_field_name).click()

or add an option for it

yastasiuk commented 6 years ago

Agree, would be a nice feature, but what about xpath? it will add more flexibility :)

0xRCE commented 6 years ago

Hi @jmtaillant and @PandaTime,

I extended the element lookup by id and name using the original commandline option for both username and password field.

See commit ca3b63d