Anchor Test Site


Images as content of hyperlinks

A sequence of hyperlinks and pictures as content like:
<a href="customers.html"><img src= "cust.gif"></a><a href= "reaction.html"><img src= "react.gif"></a> etc...


OverviewCustomersTech SpecsReactionWhere to Buy

 

The result should be 5 hyperlinks and 5 embedded documents:

Hyperlinks:

  1. /webobjects/overview.html
  2. /webobjects/customers.html
  3. /webobjects/techspecs.html
  4. /webobjects/reaction.html
  5. /webobjects/buy.html

Images:

  1. /webobjects/images/overviewup.gif
  2. /webobjects/images/customersup.gif
  3. /webobjects/images/techup.gif
  4. /webobjects/images/reactionup.gif
  5. /webobjects/images/buyup.gif

Build 651-652: handling of http error 404


Images as content of hyperlinks

An anchor that has more than one picture as content like:
The pictures don't exist. No alternative text or other identification is available.

<a href= "/"><img src="/pic1.jpg"><img src= "/pic2.jpg"></a> 

 


Problems:

  1. How to identify those links. Current situation: WebPageLink("","")
  2. Replay of WebPageLink("","")

Build 614 ok:
The click is recorded something like WebPageLink(NULL, "", 7).

Real life example:
http://www.apple.com


Hyperlinks that have to be ignored

 Hyperlinks like

  1. mailto:office@segue.at
  2. view-source://http://
  3. <a href="javascript:void(0)">Null</a>

have to be ignored.

The follwing anchors should be ignored by the recorder


Do not convert Url query strings to forms

Urls with an appended query string like:

<a href="/data2html.asp?sessionid= "203j0239j298fu398u2398u2309820398u2093u8">Link</a>

must not be converted to url strings, because the query string can hold a sessionid which must not be hardcoded.
Use WebPageLink(...) instead.

/data2html.asp?value="randomvalue"


Illegal nested links

<a href="http://"><a href= "http://"></a></a>

The outer anchor should be ignored. The target will be determined by the inner anchor. Anyway well known browsers add both hyperlinks to their list of anchors. When resolving this link the innermost one has to be taken.

Link to

Two possibilities that result can look like: 

According to HTML specification one hyperlink

Like browsers use to handle it

 


 

Nasty nested link 

<a href="http://"><a href="http://"> link</a><a href= "http://lab4">lab4link</a> </a>

link lab4 link

Two hyperlinks have to be extracted:


WebPageLink and Identification of hyperlinks

The picture is the content of a hyperlink that targets http://. The content of the second link is '' and targets http:// as well.

<a href="http://"><IMG alt=SegueLogo border=0 src="segue.gif"></a>
<a href= "http://"></a>

When you click the second link the recorder should create something like

WebPageLink("", "SilkPerformer Test Site")

 

SegueLogo

 

Result should look like:

  1. When you click the first link: WebPageLink( identification, "SilkPerformer Test Site")
  2. When you click the second link: WebPageLink("", "SilkPerformer Test Site")