From: Arup Rakshit Date: 2013-02-01T16:27:08+09:00 Subject: Re: Why Array#include? not working withone liner integer arrays? Justin Collins wrote in post #1094691: > On 01/31/2013 11:01 PM, Arup Rakshit wrote: >> => false >> irb(main):010:0> [1,2,3].inculde?(1) >> NoMethodError: undefined method `inculde?' for [1, 2, 3]:Array >> from (irb):10 >> from C:/Ruby193/bin/irb:12:in `
' >> irb(main):011:0> >> >> Could you please if is it possible what I am looking for or I did the >> mistake? >> >> Thanks >> > > > You are misspelling "include" :) > > -Justin The below should work right Logically ? @extension = File.extname(link_text) driver.find_element(:link, link_text).click if [".pdf",".gif",".bmg","tif",".tiff","jpeg",".jpg"].include?(@extension) -- Posted via http://www.ruby-forum.com/.