It's hard to figure out exactly what it is you want to do with this method or why it's even necessary--or why your type parameter would ever be anything other than a string--but here's a way to help you clean up your code that's similar to what orde suggested.
Note that it's unclear what you're implying when you say "it's definitely not a string." If it's not a string, what is it? Where is it coming from that you are sticking it into this method's parameters without knowing what type of Object it is?
So... I'm assuming your type doesn't have to be a String object, so I made it so it takes symbols...
def click(text, type)
types={span: :text, button: :name, image: :src, title: :title }
@b.send(type, {types[type]=>text}).click
end