Watir tips and tricks
A collection of useful tips and tricks for WATIR and RUBY.
Home
Installation
Errors
Tuesday, September 6, 2011
URL parsing
Here is an example on how to easily parse an URL.
e.g.
http://www.someurl.com?a=1&b=2&c=3
$baseurl = $ie.url.split("?")[0]
$aparam = $ie.url.split("a=")[1].split("&")[0]
$bparam = $ie.url.split("b=")[1].split("&")[0]
$cparam = $ie.url.split("c=")[1]
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment