java script error
Hi , I have a login script for login in plugin which is used to run few days back for arachni scan without any issuses.
Suddenly when I ran, it is throwing the issue as "Yo must have java script turned on to acess our website".. it seems java script is disabled.
What are the minimum changes need to do??
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
Support Staff 1 Posted by Tasos Laskos on 14 Apr, 2017 11:10 AM
I'm not sure what you mean, what part of the system is throwing that error and what's your login script?
2 Posted by naveen.085 on 14 Apr, 2017 01:51 PM
my loginscript
username= ARGV[0].to_s
password= ARGV[1].to_s
loginUrl= ARGV[2].to_s
puts username
puts password
puts loginUrl
browser.goto(loginUrl)
form = browser.form(id: 'loginForm')
form.text_field(name: 'username').set username
form.text_field(name: 'password').set password
browser.button(:id => 'loginButton').click
sleep 30
browser.screenshot.save("afterlogin.png")
#framework.options.session.check_url = browser.url.
when I ran scan, it disabled javascript . Not sure why java script is disabled,
Support Staff 3 Posted by Tasos Laskos on 14 Apr, 2017 01:59 PM
Have you tried changing the
--http-user-agent
?4 Posted by naveen.085 on 14 Apr, 2017 02:24 PM
Hi , Yes i have as --http-user-agent= Mozilla/5.0
5 Posted by naveen.085 on 17 Apr, 2017 01:41 PM
Please suggest if any issue with the way I initiate scan
Support Staff 6 Posted by Tasos Laskos on 21 Apr, 2017 11:03 AM
Any chance I can access the web application to see what's going on?
7 Posted by naveen.085 on 21 Apr, 2017 05:35 PM
I have a same script standalone running without issue
require 'watir'
require 'phantomjs'
require 'browser'
Selenium::WebDriver::PhantomJS.path = 'C:\Naveen\softwares\phantomjs-2.1.1\bin\phantomjs.exe'
Selenium::WebDriver.for :remote, url: 'http://localhost:8001'
browser =Watir::Browser.new :phantomjs
url='http://mysite.com/login'
puts url
puts 'On Landing Page'
browser.goto(url)
browser.screenshot.save("landingPage.png")
sleep 30
sleep 30
sleep 30
puts "URL\t"+browser.url
browser.screenshot.save("1applicationPage.png")
form = browser.form(id: 'myform')
puts browser.html
puts 'Filling CWS page'
form.text_field(name: 'username').set 'ssss'
form.text_field(name: 'password').set 'Happsy123'
browser.button(:id => 'loginButton').click
sleep 45
sleep 45
sleep 45
browser.screenshot.save("homepage.png")
#=end
But same script i gave as my arachni loginscript which makes browser java script disable not sure what is the issue
8 Posted by naveen.085 on 21 Apr, 2017 07:34 PM
Hi,
Same script which I have provided prior giving attached error in the browser( i took screenshot) with arachni which i have provided in my first comment of the discussions
Support Staff 9 Posted by Tasos Laskos on 23 Apr, 2017 01:28 PM
I understand but I need to access the web application in order to debug this issue.
10 Posted by naveen.085 on 24 Apr, 2017 02:16 PM
Hi,
I am sorry due to compliance , I could not share my app . If you can tell me some generic ways to debug, I can provide the logs.
If you can tell me how to enable javascript manually in my login script, I will try..
Thanks
11 Posted by naveen.085 on 27 Apr, 2017 06:48 PM
Hi Tasos,
Can you please help to enable log and find whether java script enabled or not.
Support Staff 12 Posted by Tasos Laskos on 28 Apr, 2017 10:58 AM
Javascript is always enabled, there may be some kind of error or incompatibility with the browser Arachni uses but unfortunately I won't be able to tell nor fix it without access.
Tasos Laskos closed this discussion on 12 May, 2017 12:44 PM.