dvox
14 years agoOccasional Contributor
Click on dynamic link with static name
I am using tree model for my scripts. I have a link which has a static text as "Delete Folder". But recording the same gives a different name everytime since the ID associated to the folder is unique for every transaction.
To do this, I used the following to code to confirm that the object actually exists. But I am not sure, how to click on this object. Would appreciate any help. I am also putting down the html code of the link. Hope that might help you in guiding me.
if(aqString.Find(iexplore.pagemyprojectshare2.formAspnetform.innerHTML, "Delete Folder")!= -1)
{
Log.Message("Object found");
}
HTML
<li>
<a href="#" onclick='DeleteFolder();return false;'><img src="/App_Themes/Main2_0/images/ico-delete.png" style="margin-right:5px;" />Delete Folder</a>
</li>
To do this, I used the following to code to confirm that the object actually exists. But I am not sure, how to click on this object. Would appreciate any help. I am also putting down the html code of the link. Hope that might help you in guiding me.
if(aqString.Find(iexplore.pagemyprojectshare2.formAspnetform.innerHTML, "Delete Folder")!= -1)
{
Log.Message("Object found");
}
HTML
<li>
<a href="#" onclick='DeleteFolder();return false;'><img src="/App_Themes/Main2_0/images/ico-delete.png" style="margin-right:5px;" />Delete Folder</a>
</li>