From: Love U Ruby Date: 2013-02-26T17:52:34+09:00 Subject: no element found error with selenium-webdriver For the below code I am getting error as "no element found" if download_field_name == "form :" if (download_link =~ /fileEntityId=\d+/) != nil #driver.find_element(:link, link_text).click puts @extension puts link_text driver.find_element(:link, link_text).click if [".pdf",".gif",".bmp",".tif",".jpeg",".jpg"].include?(@extension) end end ******************** =========================================== C:\Documents and Settings\My Documents\userdata\Ruby\Scripts>dwonloadv4 .rb .bmp Gaurav Kapoor BR.bmp .txt Timothy L. Casbeer W9.txt .bmp Jason Mattiace BR.bmp .docx Reimbursements.docx =========================================== Are the below text is culprit - "Gaurav Kapoor BR.bmp" - this is present in the webpage, but above code is saying not found. -- Posted via http://www.ruby-forum.com/.