Enter icons2.gif in excel instead of /icons2.gif/. Then try this: IMAGE = worksheet.range('b11')['Value'] $ie.image(:src, /#{IMAGE}/).click
Zeljko ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Amitha Shetty Sent: Wednesday, November 02, 2005 1:25 PM To: wtr-general@rubyforge.org Subject: [Wtr-general] How to get Image Source from Excel Input file? Hi, I am getting Inputs from an Excel file for my test cases and its working fine for all except Image source. I tried: IMAGE = worksheet.range('b11')['Value'] and value in excel corresponding to Cell b11 is /icons2.gif/ $ie.image(:src,IMAGE).click gives the following exception- `assert_exists': Unable to locate object, using src and /icons2.gif/(Watir::Exception::UnknownObjectException) from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:2009:in `click' However if I hardcode the source it works fine.... i.e $ie.image(:src,/icons2.gif/).click clicks on the image. I think the problem is because input is read from excel as a string.How do I handle this? Thanks, Amitha ________________________________ Enjoy this Diwali with Y! India Click here <http://in.promos.yahoo.com/fabmall/index.html> _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general