Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Jari Bakken
RE: browser.text vs browser.html ? [ reply ]  
2010-09-14 09:27
Browser#html is equivalent to "View source" in the browser. Try Browser#xml if you want the updated DOM.

By: Aaron Cheung
browser.text vs browser.html ? [ reply ]  
2010-09-14 01:55
Hi All,

Very excited to begin using Celerity! I'm currently finding that AJAX calls that result in DOM insertion are updating browser.text but not browser.html. Here's an example of my code:

browser = Celerity::Browser.new(:render => :xml(tried html as well), :javascript_exceptions => true, :log_level => :all)
browser.goto('http://domain.com')
browser.wait
browser.text_field(:id => "textarea1").value = "newvalue"
browser.span(:id => "buttonid").click
browser.wait
puts browser.text
puts browser.html

The button that I'm clicking is supposed to insert text into the page. I'm seeing that insertion when I output browser.text. However, browser.html is not updating.

I've replicated this problem on a number of my pages. Am I missing something important with browser initialization?

Very best and thanks for your time!
Aaron