From: King Maker Date: 2010-06-01T15:15:42+09:00 Subject: If else condition in ruby not working i write simple code for button if button pressed than result is passed other wise failed. but every time condition goes to the Failed. i try may things but every time i face this problem. begin if(ie.button(:value,"Continue").click) @result = 'PASSED' @log = "Clicked Continue button" log.info "Clicked Continue button\n" else @result = 'FAILED' @log = "Clicked Continue button not pressed" log.info "Clicked Continue button not pressed\n" end Readfrom_file(@file1,"Continue button",@log,@result) rescue end -- Posted via http://www.ruby-forum.com/.