Forum: Ruby on Rails Identify dynamic name using Scrubyt

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Saurabh P. (Guest)
on 2009-05-12 11:29
Hi All,

I'm trying to execute the following code.

url = "https://xxx.com"(some url)
ebay_data = Scrubyt::Extractor.define :agent => :firefox  do
 fetch(url)
 fill_textfield field name, value
 record "//table[@id='header']" do
   name "//input[@class='req']"
 end
end

Code executes properly for static name of textfield

But the url which i'm trying to fetch is having dynamic name so when i
try to run the code it gives me error:

  Unable to locate element, using :name, ""
(Watir::Exception::UnknownObjectException)

Every time the name changes on refresh. Please suggest me how should I
fill the text field of a url with dynamic text_field name. (Using
Scrubyt)

Thanks
Saurabh
This topic is locked and can not be replied to.