I am trying to 1. Login to my webapp 2. Check for some new rows in a table tag
I have issues with the step 1.
$username = "admin"
$password = "admin"
$ie = New-Object -com InternetExplorer.Application
$ie.visible = $false
$ie.navigate("https://somesite.com")
while ($ie.ReadyState -ne 4) { start-sleep -m 100 }
#start-sleep 10
$ie.document.getElementById("login-form-username").value = "$username"
$ie.document.getElementById("login-form-password").value = "$password"
$ie.document.getElementById("login").submit()
start-sleep 20
$ie.Document.body | Out-File -FilePath c:\web.txt
It opens IE11 and goes to the page.
But when it comes to need to findById and input - there is an error:
The property 'value' cannot be found on this object. Verify that the property exists and can be set
my HTML input section is:
<input name="os_username" class="text medium-field" id="login-form-username" type="text">
id="login-form-username"in your page?id="login-form-username"in this document.