次の powershell スクリプトを実装することは可能ですか?
目的は、後でスクリプト ブロックを呼び出して、html コントロールを取得することです。
$sites = @{
site1= @{
url = ".......";
inputUserID = { $doc.getElementsByID("username"]) }; #Some code to get the html input control
inputPassword = { $doc.getElementsByName("passowrd"]) }; #Some code to get the html input control
};
.....
}
$ie = New-Object -ComObject "InternetExplorer.Application"
$ie.navigate($sites[$site]["url"])
$ie.visible = $true
while ($ie.busy) { start-sleep -milliseconds 1000; }
... #Get the input controls and fill the values
質問が更新されました。それは十分に明確ですか?理解するのはそれほど難しいことではないはずです。