[Samie-code] Problem using ClickLink with embedded <BR> tag.
Brought to you by:
henrywasserman,
techlogic
|
From: Nick N. <Nic...@sn...> - 2004-04-06 16:47:46
|
I'm having a problem using SAMIE clicking on a link that has an embedded
<BR> tag with tabs / carriage return line feeds.
Here the link on the HTML page (View Source).
<a
href="/ims/servlet/Service?OPERATION=select&COLLABORATION=claim&SURROGATE=23
9664&SELECT=element">
239664<BR>WCW0440
</a>
We use a Java API known as ECS from Apache group that prints the nice html.
Can we modify the ClickLink sub to ignore all white space ( spaces, tabs,
line feeds.)
I tried modifying SAM.pm with the following but with no luck.
#print $IEDocument->all($i)->innerText . "\n";
$innertext = $IEDocument->all($i)->innerText;
#Remove white space from the beginning of the string.
$innertext =~ s/^\s+// if (defined($innertext));
#Remove white space from the end of the string.
$innertext =~ s/\s+$// if (defined($innertext));
if (defined($innertext) && $innertext =~ /^\Q$LinkName\E$/) {
#$Index is used if there are more than one link with the same
name
Any thoughts. In one way it seems you shouldn't have a <BR> tag in the
text, but I think this would be HTML correct.
Thanks,
Nick Neuberger
- - - - - -
This e-mail message is intended only for the use of the individual or entity
identified in the alias address of this message and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution of this e-mail message is strictly prohibited. If you have
received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message from your system. Thank you.
|