From peter at hexagile.com Fri Oct 28 05:33:36 2011 From: peter at hexagile.com (Peter Szinek) Date: Fri, 28 Oct 2011 11:33:36 +0200 Subject: [Celerity-users] wrong rendering of a page Message-ID: Hey guys, Tried this without javascript, as well as :resynchronize => true (not sure it should make any difference in this case - well it doesn't) browser = Celerity::Browser.new(:user_agent =>'Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)') browser.goto "http://careers.peopleclick.com/careerscp/client_motorola/external/search.do" browser.element_by_xpath("//input[@id='searchButton']").exists? => false That button should definitely be there (checked in a real browser, and even with mechanize) - I know for a fact that until recently the above code returned true, since we are having this scrape around since months if not years, and it was working. The strange thing is the above code is happening with 0.8.9, 0.9.0 as well as 0.9.1... maybe jruby-1.6.3 is the culprit? Need to check this with jruby-1.6.4 Help! Cheers, Peter From peter at hexagile.com Fri Oct 28 06:37:52 2011 From: peter at hexagile.com (Peter Szinek) Date: Fri, 28 Oct 2011 12:37:52 +0200 Subject: [Celerity-users] wrong rendering of a page In-Reply-To: References: Message-ID: Somewhat better with juby-1.6.5 - at least now when I examine browser.xml (by outputting it to a html file and opening that in a browser) the button is visible (with jruby-1.6.3 it's not even visible in the browser). However, browser.element_by_xpath("//input[@id='searchButton']").exists? still returns false... On Fri, Oct 28, 2011 at 11:33 AM, Peter Szinek wrote: > Hey guys, > > Tried this without javascript, as well as :resynchronize => true (not > sure it should make any difference in this case - well it doesn't) > > browser = Celerity::Browser.new(:user_agent =>'Mozilla/4.0 > (compatible; MSIE 7.0b; Windows NT 6.0)') > browser.goto "http://careers.peopleclick.com/careerscp/client_motorola/external/search.do" > browser.element_by_xpath("//input[@id='searchButton']").exists? > ?=> false > > That button should definitely be there (checked in a real browser, and > even with mechanize) - I know for a fact that until recently the above > code returned true, since we are having this scrape around since > months if not years, and it was working. The strange thing is the > above code is happening with 0.8.9, 0.9.0 as well as 0.9.1... maybe > jruby-1.6.3 is the culprit? Need to check this with jruby-1.6.4 > > Help! > > Cheers, > Peter > From peter at hexagile.com Fri Oct 28 08:10:11 2011 From: peter at hexagile.com (Peter Szinek) Date: Fri, 28 Oct 2011 14:10:11 +0200 Subject: [Celerity-users] wrong rendering of a page In-Reply-To: References: Message-ID: OK so this is getting really weird here. browser.xml contains but I can't get it with an XPath. also stuff like like browser.elements_by_xpath("//input").map{|x|x.id} doesn't reveal the id either. I'm wondering whether the "" after the input tag is screwing things up.... On Fri, Oct 28, 2011 at 12:37 PM, Peter Szinek wrote: > Somewhat better with juby-1.6.5 - at least now when I examine > browser.xml (by outputting it to a html file and opening that in a > browser) the button is visible (with jruby-1.6.3 it's not even visible > in the browser). However, > > browser.element_by_xpath("//input[@id='searchButton']").exists? > > still returns false... > > On Fri, Oct 28, 2011 at 11:33 AM, Peter Szinek wrote: >> Hey guys, >> >> Tried this without javascript, as well as :resynchronize => true (not >> sure it should make any difference in this case - well it doesn't) >> >> browser = Celerity::Browser.new(:user_agent =>'Mozilla/4.0 >> (compatible; MSIE 7.0b; Windows NT 6.0)') >> browser.goto "http://careers.peopleclick.com/careerscp/client_motorola/external/search.do" >> browser.element_by_xpath("//input[@id='searchButton']").exists? >> ?=> false >> >> That button should definitely be there (checked in a real browser, and >> even with mechanize) - I know for a fact that until recently the above >> code returned true, since we are having this scrape around since >> months if not years, and it was working. The strange thing is the >> above code is happening with 0.8.9, 0.9.0 as well as 0.9.1... maybe >> jruby-1.6.3 is the culprit? Need to check this with jruby-1.6.4 >> >> Help! >> >> Cheers, >> Peter >> > From peter at hexagile.com Fri Oct 28 08:24:07 2011 From: peter at hexagile.com (Peter Szinek) Date: Fri, 28 Oct 2011 14:24:07 +0200 Subject: [Celerity-users] wrong rendering of a page In-Reply-To: References: Message-ID: OK so this is as far as I got: jruby-1.6.5 :042 > browser.element_by_xpath("//div[@id='pc-rtg-lastCriteria']").html => "
\n \n \n \n \n \n \n \n \n \n \n
\n
\n \n Results per page:\302\240\n\n \n \n \n \n \n \n
\n
\n" As you can see the two inputs are there, but they are detected as "text" and also missing all the other attributes. I think this might be exactly because the "" after the input tag. On Fri, Oct 28, 2011 at 2:10 PM, Peter Szinek wrote: > OK so this is getting really weird here. > > browser.xml contains > > value="Reset" class="pc-rtg-submitButton" onclick="return > submitOnce();"> > > but I can't get it with an XPath. > > also stuff like > > like browser.elements_by_xpath("//input").map{|x|x.id} > > doesn't reveal the id either. > > I'm wondering whether the "" after the input tag is screwing things up.... > > On Fri, Oct 28, 2011 at 12:37 PM, Peter Szinek wrote: >> Somewhat better with juby-1.6.5 - at least now when I examine >> browser.xml (by outputting it to a html file and opening that in a >> browser) the button is visible (with jruby-1.6.3 it's not even visible >> in the browser). However, >> >> browser.element_by_xpath("//input[@id='searchButton']").exists? >> >> still returns false... >> >> On Fri, Oct 28, 2011 at 11:33 AM, Peter Szinek wrote: >>> Hey guys, >>> >>> Tried this without javascript, as well as :resynchronize => true (not >>> sure it should make any difference in this case - well it doesn't) >>> >>> browser = Celerity::Browser.new(:user_agent =>'Mozilla/4.0 >>> (compatible; MSIE 7.0b; Windows NT 6.0)') >>> browser.goto "http://careers.peopleclick.com/careerscp/client_motorola/external/search.do" >>> browser.element_by_xpath("//input[@id='searchButton']").exists? >>> ?=> false >>> >>> That button should definitely be there (checked in a real browser, and >>> even with mechanize) - I know for a fact that until recently the above >>> code returned true, since we are having this scrape around since >>> months if not years, and it was working. The strange thing is the >>> above code is happening with 0.8.9, 0.9.0 as well as 0.9.1... maybe >>> jruby-1.6.3 is the culprit? Need to check this with jruby-1.6.4 >>> >>> Help! >>> >>> Cheers, >>> Peter >>> >> > From jari.bakken at gmail.com Fri Oct 28 22:21:25 2011 From: jari.bakken at gmail.com (Jari Bakken) Date: Fri, 28 Oct 2011 19:21:25 -0700 Subject: [Celerity-users] wrong rendering of a page In-Reply-To: References: Message-ID: You'll probably have more luck bringing this up on the HtmlUnit list. On Fri, Oct 28, 2011 at 3:37 AM, Peter Szinek wrote: > Somewhat better with juby-1.6.5 - at least now when I examine > browser.xml (by outputting it to a html file and opening that in a > browser) the button is visible (with jruby-1.6.3 it's not even visible > in the browser). However, > > browser.element_by_xpath("//input[@id='searchButton']").exists? > > still returns false... > > On Fri, Oct 28, 2011 at 11:33 AM, Peter Szinek wrote: > > Hey guys, > > > > Tried this without javascript, as well as :resynchronize => true (not > > sure it should make any difference in this case - well it doesn't) > > > > browser = Celerity::Browser.new(:user_agent =>'Mozilla/4.0 > > (compatible; MSIE 7.0b; Windows NT 6.0)') > > browser.goto " > http://careers.peopleclick.com/careerscp/client_motorola/external/search.do > " > > browser.element_by_xpath("//input[@id='searchButton']").exists? > > => false > > > > That button should definitely be there (checked in a real browser, and > > even with mechanize) - I know for a fact that until recently the above > > code returned true, since we are having this scrape around since > > months if not years, and it was working. The strange thing is the > > above code is happening with 0.8.9, 0.9.0 as well as 0.9.1... maybe > > jruby-1.6.3 is the culprit? Need to check this with jruby-1.6.4 > > > > Help! > > > > Cheers, > > Peter > > > _______________________________________________ > Celerity-users mailing list > Celerity-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/celerity-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: