ruby - bad URI(is not URI?) when using click_link -


i have code line looks this:

click_link "link page spaces" 

the link looks in html:

<a href="page spaces">link page spaces</a> 

when line runs get:

bad uri(is not uri?): page spaces /opt/rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/uri/common.rb:176:in `split' 

i understand problem because link contains spaces not converted %20 i'm not sure on how solve it.

could escape uri wherever it's being generated?

require 'uri' uri.escape("page spaces") # => "page%20with%20spaces" 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -