Execute javascript trough Internet Explorer's com interface using PowerShell
$spans=@($ie.document.getElementsByTagName("SPAN"))
Pipe to where-object to filter the one you need (based on its attributes) and then call the click method, for example:
$span11 = $spans | where {$_.innerText -eq 'something'}$span11.click()