tag:support.arachni-scanner.com,2012-07-01:/discussions/problems/4183-js-rich-login-scripts-not-working-in-linuxubuntuArachni: Discussion 2017-02-05T11:13:28Ztag:support.arachni-scanner.com,2012-07-01:Comment/416626102017-01-04T11:38:32Z2017-01-04T11:38:32ZJS-rich login scripts not working on Linux/Ubuntu<div><p>Can I see the logins script please?<br>
There shouldn't be any difference across operating systems.</p>
<p>Cheers</p></div>Tasos Laskostag:support.arachni-scanner.com,2012-07-01:Comment/416626102017-01-04T15:18:30Z2017-01-04T15:19:53ZJS-rich login scripts not working on Linux/Ubuntu<div><p>Hi Tasos. Here is a summary:</p>
<p><strong>Expected</strong> (works on Mac)</p>
<p>Navigate to landing/login page for various app's<br>
App's are listed in dropdown<br>
User selects app from dropdown<br>
Username field and "Next" button appear<br>
User enters username and clicks "Next"<br>
Password field appears<br>
User enters password and signs in</p>
<p><strong>Actual</strong> (on Ubuntu)</p>
<p>Navigates to login page (HTML loads but not displayed in
screenshot)<br>
Appropriate dropdown option selected (dropdown items not in
screenshot but in HTML)<br>
Arachni attempts to locate username text field, but it does not
load (not even in the HTML)</p>
<p>Below are the login script and snippet of HTML for the dropdown
item that is clicked.</p>
<p>Login Script (contains steps for delays, prints, and screen
captures for debugging):</p>
<pre>
<code>browser.goto 'https://my.site.com/login.html'
sleep 15
browser.screenshot.save ("arachni_goto.png")
# The next dropdown contains a list of web applications that the user wants to log into
browser.button(:id => "id-dropdown").wait_until_present(30)
# The next two screenshots show the dropdown element present, but items in the dropdown list do not load
# However, the dropdown items are present in an html dump (puts browser.html)
browser.screenshot.save ("arachni_dropdown_found.png")
browser.button(:id => "id-dropdown").click
sleep 5
browser.screenshot.save ("arachni_show_dropdown.png")
# Clicking dropdown option is supposed to load text field for username but does not load text field
browser.label(:id => 'dropdown_option2').click
#browser.div(:id => 'option2').click # Also tried clicking this element
sleep 5
browser.screenshot.save ("arachni_select.png")
puts browser.html # HTML dump shows dropdown elements but no username text field
browser.text_field(id: 'id-username').wait_until_present(30) # <------ Fails at this next step;
browser.text_field(id: 'id-username').set 'myuserid'
browser.button(id: 'id-continue').click
browser.img(:id => 'id-image').click
browser.screenshot.save ("arachni_click_image.png")
browser.text_field(id: 'id-password').set 'password'
browser.send_keys :enter
browser.a(:id => "my-accounts").wait_until_present(25)
framework.options.session.check_url = 'https://my.site.com/account-summary'
framework.options.session.check_pattern = ""</code>
</pre>
<p>The following shows the HTML for the dropdown item that is
clicked, and is supposed to load the username field:</p>
<pre>
<code><div id="option2" tabindex="-1" role="option" class="item-list" ng-click="itemSelected('languageJsonProps.xxxx.xxxx.text', 'App #2')">
<label id="dropdown_option2" class="item-list-label ng-scope" style="float:left; margin-right:5px;" translate-default="App #2" translate="languageJsonProps.xxxx.xxxx.text">App #2</label>
</div></code>
</pre></div>testertag:support.arachni-scanner.com,2012-07-01:Comment/416626102017-01-05T11:36:13Z2017-01-05T11:36:13ZJS-rich login scripts not working on Linux/Ubuntu<div><p>Any chance I can be given access to the webapp?</p></div>Tasos Laskos