如何在此用户名字段中输入文本

How to input text into this username field

我需要帮助将文本输入到这个用户名文本框中。

此文本框在网站上的 html 代码如下所示。

<input type="text" name="username1" maxlength="16" onpaste="return false" 
oncopy="return false" oncut="return false" autocomplete="off" autocapitalize="off" 
value="" id="input-rounded" class="userpass"
onkeydown="checkField(document.forms[0].username, document.forms[0].username1);" 
onkeyup="checkField(document.forms[0].username, document.forms[0].username1);" 
onchange="checkField(document.forms[0].username, document.forms[0].username1);">

我使用 powershell 尝试了下面的代码,但它不起作用。用户名文本框上仍然没有出现任何文字。

$elements = $IE.document.getElementsByName('username1')
Foreach($element in $elements) {$element.value = $Username}

改用 IHTMLDocument3_getElementByID()。

$IE.document.IHTMLDocument3_getElementByID('username1').value = $Username