Here are two links named NEW.
< a href="#" onclick="CloneDiv('#Div1');return false;" class="smaller">NEW</a>
< a href="#" onclick="CloneDiv('#Div2');return false;" class="smaller">NEW</a>
The difference between them is the onclick action.
One clones a div named Div1.
The other clones a div named Div2.
How do I locate the link that clones Div1?
try
"//a[@onclick='CloneDiv('#Div2');return false;']"as your locator