Cant get login script to work.

Camillo's Avatar

Camillo

22 Nov, 2016 06:31 PM

I have been trying to get my login_script to work on the arachni GEM but keep getting this error(Screenshot).

The script works when using the arachni-1.4-0.5.10-linux-x86_64.tar.gz files, but on the gem it does not work.

browser.goto 'https://secure.nuuvem.local/account/login'

form = browser.section( id: 'login').form( id: 'new_customer' )
form.text_field( name: 'customer[login]' ).set '[email blocked]'
form.text_field( name: 'customer[password]' ).set 'somepass123'

form.submit

# You can also configure the session check from the script, dynamically,
# if you don't want to set static options via the user interface.

framework.options.session.check_url     = browser.url
framework.options.session.check_pattern = /.*/

Any help would be usefull. Thanks

  1. Support Staff 1 Posted by Tasos Laskos on 22 Nov, 2016 09:46 PM

    Tasos Laskos's Avatar

    Is there a reason you're using the GEM rather than the packages?

  2. 2 Posted by Camillo on 23 Nov, 2016 06:51 PM

    Camillo's Avatar

    The reason is we want to be able to just bundle install the gem in a gemfile and be able to use our commands to check our plataform.

    It works, but i am having this problem regarding the login.

  3. Support Staff 3 Posted by Tasos Laskos on 23 Nov, 2016 06:53 PM

    Tasos Laskos's Avatar

    Did you try verifying your login script with the packages?

  4. 4 Posted by Camillo on 23 Nov, 2016 06:55 PM

    Camillo's Avatar

    Yes, i have tried the login script before on the packages, and worked.

    That´s why i´m not so sure what could be the problem. Dis a research but did not find a solution.

  5. Support Staff 5 Posted by Tasos Laskos on 23 Nov, 2016 06:58 PM

    Tasos Laskos's Avatar

    It can be about a thousand different things, that's why you should be using the packages, they provide a tested env that's known to work.
    It will be a little more trouble in your case, but at least you'll get something reliable.

    If you really need the Gem though, my first thought would be checking what PhantomJS verison you have, the current Gem depends on PhantomJS 1.9.2.

  6. 6 Posted by Camillo on 23 Nov, 2016 07:07 PM

    Camillo's Avatar

    I added it to the gemfile, and still having the same error.

  7. Support Staff 7 Posted by Tasos Laskos on 23 Nov, 2016 07:08 PM

    Tasos Laskos's Avatar

    This is an env issue, I don't think I can help you, you better stick with the packages.

  8. 8 Posted by Camillo on 23 Nov, 2016 07:10 PM

    Camillo's Avatar

    Testing the script again on the packages, and im getting a wierd "freeze"...after the login actually happens(the console from the app shows the login and redirect) the login script just...waits...and never finish.

  9. Support Staff 9 Posted by Tasos Laskos on 23 Nov, 2016 07:11 PM

    Tasos Laskos's Avatar

    Can you give the nightlies a shot and see if they fix the issue please?

  10. 10 Posted by Camillo on 23 Nov, 2016 07:14 PM

    Camillo's Avatar

    On the nightlies it worked great.

  11. Support Staff 11 Posted by Tasos Laskos on 23 Nov, 2016 07:15 PM

    Tasos Laskos's Avatar

    Must be a bug that has been fixed then, you should keep using the nightlies since it works there.

  12. Tasos Laskos closed this discussion on 28 Nov, 2016 03:21 PM.

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