1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
$ie = New-Object -com "InternetExplorer.Application" $ie.Navigate("about:blank") $ie.visible = $true $htmlnew=('<script> function muestraInformacion(elEvento) { var evento = elEvento || window.event; var coordenadaX = evento.clientX; var coordenadaY = evento.clientY; document.write("<li>Has pulsadoen la posición: " + coordenadaX + ", " + coordenadaY + "</li>"); } document.onclick = muestraInformacion; </script>') $ie.Document.write($htmlnew) $ie.Document.getElementsByTagName("li") | Select-Object -ExpandProperty innerText |