Login_script could be able to login successfully, but session check was not able to use any cookies

jingxus's Avatar


13 Feb, 2018 03:25 AM

I wrote a ruby script as a plugin. the code as:

browser = Watir::Browser.new :chrome
browser.goto 'http://example.com'
form = browser.forms.first

print "Browser form : #{form}"

form.text_field( name: 'phoneEmailUsername' ).set ''
form.text_field( name: 'phoneEmailUsername' ).focus()
form.text_field( name:'password' ).set '
form.text_field( name:'password' ).focus()
form.button( class: 'auth-button').click()

framework.options.session.check_url = browser.url
framework.options.session.check_pattern = />Logout</

I can see arachni open a chrome browser and login successfully, and then close the browser. However, it was not able to capture any cookies, so the session check still fail, anyone know the reason.

i also tried to delete the first line, use the default arachni browser, if use the default browser driver, no browser pop out, and check stail fail.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac