Unable to open www.yahoo.com in default/firefox mode! #48

Closed
mrinalkuchhal opened this Issue Jan 10, 2011 · 1 comment

Projects

None yet

2 participants

@mrinalkuchhal

On opening the website "http://www.yahoo.com" in default or firefox or firefox3 mode the website is not opened properly. However when I open it in internet_explorer mode the website opens properly.
I am using the latest version 0.8.7.

Here is the sample code:

require "rubygems"
require "celerity"
br = Celerity::Browser.new()
br.goto("http://www.yahoo.com")
puts br.html

Expected Output: The entire source code of the website

Actual Output: Just 1 line

<!-- w12.fp.re1.yahoo.com uncompressed/chunked Mon Jan 10 04:38:35 PST 2011 -->

which is actually just the last line of the source code of the site.
However if I open it in internet_explorer mode


require "rubygems"
require "celerity"
br = Celerity::Browser.new(:browser => :internet_explorer)
br.goto("http://www.yahoo.com")
puts br.html

It functions as expected and the complete site is available.

@jarib
Owner

Hi,

This isn't a bug in Celerity, but in HtmlUnit. See this page for how to submit bugs:

http://htmlunit.sourceforge.net/submittingBugs.html

This seems to be reproducible going way back through Celerity's (and HtmlUnit's history). I tried 4d322c2, which is from December 2009, and I still get the same behaviour.

Here's the JRuby script I used to reproduce:

require "java"

Dir['lib/celerity/htmlunit/*.jar'].each do |jar|
  require jar
end

import com.gargoylesoftware.htmlunit.WebClient
import com.gargoylesoftware.htmlunit.BrowserVersion

# version = BrowserVersion::INTERNET_EXPLORER_7
version = BrowserVersion::FIREFOX_3

wc = WebClient.new(version)
page = wc.getPage(::Java::JavaNet::URL.new("http://www.yahoo.com"))
puts page.getWebResponse.getContentAsString

wc.closeAllWindows
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment