From: Love U Ruby Date: 2013-02-07T22:50:48+09:00 Subject: how to skip lines whenever there is an error? Hi, I have the code below : option.select_by(:text, value) wbs.cells(rows,9).value = "Done" rows = rows + 1 count_dropdown = count_dropdown - 1 Now sometimes I am getting an error as - "(Selenium::WebDriver::Error::NoSuchElementError)" So I tried below : option.select_by(:text, value) rescue Selenium::WebDriver::Error::NoSuchElementError wbs.cells(rows,9).value = "Done" <~~ But I want this line to be skipped whenever there is an error. rows = rows + 1 count_dropdown = count_dropdown - 1 Please guide me how to do that? Thanks -- Posted via http://www.ruby-forum.com/.