On 6/11/07, sapna <[EMAIL PROTECTED]> wrote:
<a href="/AppsUIWeb/SelfService/MessageDetail.aspx?id=1303&messageToUser=True">RE: Check Copy Request</a>
Sapna, To find id of that link you have to know some other attribute of that link. I will assume that you know text "RE: Check Copy Request" This is how you can get href attribute of that link. irb> ie.link(:text, "RE: Check Copy Request").href => "file:///C:/AppsUIWeb/SelfService/MessageDetail.aspx?id=1303&messageToUser=True" This will extract 1303. irb> m = /id=(1303)/.match(ie.link(:text, "RE: Check Copy Request").href) => #<MatchData:0x2d147b8> irb> m[1] => "1303" For more information see class MatchData ( http://phrogz.net/ProgrammingRuby/ref_c_matchdata.html) Zeljko
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general