You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require 'watir'
b = Watir::Safari.new
b.goto "http://www.pastie.org"
b.text_field(:name, "paste[body]").set "Foo"
You get
Watir::Exception::UnknownObjectException: Unable to locate TextField element with id of paste_name
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.5/lib/safariwatir/scripter.rb:521:in execute' from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.5/lib/safariwatir/scripter.rb:174:infocus'
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.5/lib/safariwatir.rb:382:in `set'
from (irb):7
However it works if you address it by id.
b.text_field(:id, "paste_body").set "Foo"
Although you do see this:
=> :missing_value
and I don't know what that's supposed to mean :)
Started looking through the source code and I had no idea why this wouldn't work. This is still the case with the gem I built today from github (0.3.5)
The text was updated successfully, but these errors were encountered:
Given the site http://www.pastie.org/
and the form field
this test fails:
You get
Watir::Exception::UnknownObjectException: Unable to locate TextField element with id of paste_name
from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.5/lib/safariwatir/scripter.rb:521:in
execute' from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.5/lib/safariwatir/scripter.rb:174:in
focus'from /usr/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.5/lib/safariwatir.rb:382:in `set'
from (irb):7
However it works if you address it by id.
Although you do see this:
and I don't know what that's supposed to mean :)
Started looking through the source code and I had no idea why this wouldn't work. This is still the case with the gem I built today from github (0.3.5)
The text was updated successfully, but these errors were encountered: