Powershell open a URL, fill a value and submit

Ming Cheung 421 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.
2,329 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more