Powershell open a URL, fill a value and submit

Ming Cheung 401 Reputation points
2023-02-28T08:10:27.0533333+00:00

I would like to open a link "www.google.com"

fill a text in textbox

and then submit

$ie = New-Object -ComObject 'InternetExplorer.Application'

$ie.Visible=$true

$ie.Navigate("www.google.com")

$ie.Document.getElementsById('textbox').value='hi'

Q: (i can not get the textbox object to fill the text, and so on submit)

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
362 questions
No comments
{count} votes