From: Justin Collins Date: 2013-02-01T16:40:21+09:00 Subject: Re: Why Array#include? not working withone liner integer arrays? On 01/31/2013 11:27 PM, Arup Rakshit wrote: > 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) > Without knowing anything about what "driver" is, I would say yes. -Justin