Single page app form has no id
I'm having trouble using the login script to authenticate to a single page app with a javascript login. The username and password fields both have id's, but the form itself doesn't have an id. I've see http://support.arachni-scanner.com/kb/general-use/logging-in-and-ma..., and also tried the 2.0 nightlies with the same issue. Any help would be appreciated.
Thanks
The url looks like: https://foo.bar.com/#/login
And the script looks like:
document.getElementById( 'user' ).value = 'jsmith';
document.getElementById( 'pass' ).value = 'Demo1234';
document.getElementById( '???' ).submit(); // <-- This line causes the error.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | 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
1 Posted by John on 01 Mar, 2018 03:20 PM
I was able to work it out. The form didn't have an id, but the submit button did. So, rather than submitting the form, I used document.getElementById("ButtonID").click(); and that took care of my immediate issue.
Support Staff 2 Posted by Tasos Laskos on 26 Mar, 2018 07:55 AM
Glad to hear it.
Tasos Laskos closed this discussion on 26 Mar, 2018 07:55 AM.