[Celerity-users] click_and_attach Celerity::Exception::UnknownObjectException: no page loaded

jason franklin-stokes jasoninclass at googlemail.com
Sat Dec 12 11:17:44 EST 2009


DearJari, 

I am stuck again with click_and_attach.

After each click and and attach I call close all windows to make sure that I have not loose javascript threads hanging around - unfortunately this seems to have a side effect. After the second click I get a Celerity::Exception::UnknownObjectException: no page loaded exception. I cant figure out why. 
this is the code - you can just copy and paste it to the cli as it to see the error. 

have you got any idea what is going wrong .

Thanks a million for any ideas. 

Jason. 

browser=Celerity::Browser.new
browser.goto "http://www.swisspost.com"
browser.wait

element = browser.elements_by_xpath("/html/body/div[2]/div/div[4]/div[1]/ul[2]/li[2]/a").first
new_browser = element.click_and_attach
browser.wait
browser.webclient.closeAllWindows

browser.url

browser = new_browser

element = browser.elements_by_xpath("/html/body/div[2]/div/div[4]/div[1]/ul[1]/li[1]/a").first
new_browser = element.click_and_attach
browser.wait
browser.webclient.closeAllWindows

browser = new_browser

browser.url     # Celerity::Exception::UnknownObjectException: no page loaded




More information about the Celerity-users mailing list