Pregunta

I am having problems using AttachTo with Powershell. I searched, but can't find any Powershell example that uses AttachTo.

This doesn't work: $ie2 = $ie.AttachToIE([watin.core.Find]::ByTitle("Task Selection"))

I guess I am not sure of the syntax. The .NET uses which doesn't work in PS.

¿Fue útil?

Solución

Try this:

$ie = (New-Object -COM 'Shell.Application').Windows() | ? {
        $_.Name -eq 'Windows Internet Explorer' -and
        $_.LocationName -eq 'Task Selection'
      }
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top