Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript Execution Hangs - Need help #53

Open
VamCATS opened this issue Jul 11, 2011 · 0 comments
Open

Javascript Execution Hangs - Need help #53

VamCATS opened this issue Jul 11, 2011 · 0 comments

Comments

@VamCATS
Copy link

VamCATS commented Jul 11, 2011

Hello,

We are using Celerity (JRuby wrapper around Watir, using HtmlUnit as the underlying browser) to navigate thru the webpage, (https://www.sos.ok.gov/corp/bulkorder/bulkDefault.aspx). We have encountered an issue with java script on this webpage.

Javascript execution hangs when we try to access the URL https://www.sos.ok.gov/cart/contact.aspx?ReturnUrl=/corp/bulkorder/bulkEntry.aspx by clicking the "Place order" link on https://www.sos.ok.gov/corp/bulkorder/bulkDefault.aspx'

Using java script debugger we found that JS hangs at this piece of code.

if (!ValidatedTextBoxOnKeyPress(event)) { event.cancelBubble = true; if (event.stopPropagation) event.stopPropagation();
return false; }

Also attached the entire java script file (okjs.txt)

Javascript needs to be enabled to navigate through this website. So we can't disable javascript in this case.
Also java script timeout doesnt seem to be working here.
Is this a bug in htmlunit?

Here is the code for your reference.

require 'rubygems'
require 'celerity'
proxyProtocol, proxyHost, proxyPort = ENV["http_proxy"].split(':')
proxyHost = proxyHost.scan(%r"//(.*)")[0][0]
browser = Celerity::Browser.new( { :browser => :firefox3, :proxy => proxyHost + ':' + proxyPort } )
browser.webclient.setJavaScriptEnabled(true)
browser.css = false
browser.secure_ssl = false

HtmlUnit::Util::WebClientUtils.attachVisualDebugger(browser.webclient)

browser.goto 'https://www.sos.ok.gov/corp/bulkorder/bulkDefault.aspx' ### This works alright.
browser.wait
puts "clicking Place Order"
browser.button(:id,'ctl00_DefaultContent_buttonSubmit').click ### Here's where it hangs
browser.wait
puts browser.html

Thanks
Vamsee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant