[Celerity-users] unable to click a button - overlooking something ?
Axel Etzold
AEtzold at gmx.de
Sat Sep 26 14:12:43 EDT 2009
Dear all,
I'd like to enter some text into a text field in a
website and click a button.
Entering the text works, finding the button works,
but clicking it doesn't ( I am expecting a page
with many different tenses of a Portuguese verb, "falar").
What am I missing ?
Thank you very much!
Best regards,
Axel
Here is my code :
require "rubygems"
require "celerity"
browser = Celerity::Browser.new
browser.goto("http://linguistica.insite.com.br/cgi-bin/conjugue")
p browser.text
browser.text_fields.first.value="falar"
p 'click button: is it there ? - use browser.buttons.first method'
p browser.buttons.first.exists?
p 'try to click'
browser.buttons.first.click
puts browser.text
p '-----------------------------------------------------'
p 'second attempt : click button: is it there ? - use browser.button(:value) method'
p browser.button(:value,"conjugar").exists?
p 'try to click'
browser.button(:value,"conjugar").click # methods.sort
puts browser.text
--
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser
More information about the Celerity-users
mailing list