[Http-webtest-general] Click, match on href as well as text?
Brought to you by:
m_ilya,
richardanderson
From: Kevin B. <ke...@ri...> - 2003-01-21 21:51:35
|
Hi, I submitted this to cpan Request Tracker first... is it possible to make Click::click_link more adaptable? My issue is that I may have many <a> links on the web page returned by a test with the same <a href="...">Text</a>. The only way they differ is the contents of the href attribute of the a tag. Would it be possible to tell 'click_link' to click on the <a> tag via the href text instead of the 'Text'? For instance, I have many links on a list that look like this <a href"/edit_user.html?user=adam">Edit</a> <a href"/edit_user.html?user=john">Edit</a> <a href"/edit_user.html?user=pete">Edit</a> It'd be nice to say... click_link => { href => 'edit_user.html?user=pete' } or some wonderful syntax that differentiates from the usual way you guys built it. The other thing is that in Click::find_link, it checks the pattern case insensitively. Is it important to do this? I noticed that because I had a href link with the text, 'Back', and another mailto link with the mail address '<feedback@x.com>'. The pattern matched on the mail address first. If it had been case sensitive I wouldn't have noticed. Perhaps you can either turn this behaviour on or off or document it or let the person pass their own regex in? thanks for your efforts, much appreciated Kev -- Kevin Baker RIPE NCC |