Hello guys.
Is it possible to open html page than insert login and pass and than click "connect", than after login "remember" html code in some txt file ?
I found some code
I found in html code ID for user, pass, and "login" button
But it doesn;t work...
What can be wrong ?
Error
Thanks for any help and clue...
Is it possible to open html page than insert login and pass and than click "connect", than after login "remember" html code in some txt file ?
I found some code
Code:
$ie = New-Object -com "InternetExplorer.Application"
$ie.Navigate("[URL unfurl="true"]http://page.com")[/URL]
$ie.visible = $true
do { sleep 5 }
while ( $ie.busy )
$doc = $ie.document
$user = $doc.getElementById("A1594987279")
$password = $doc.getElementById("A1123735963")
$submit = $doc.getElementById("Connexion")
$user.value = "kolos"
$password.value = "lolos"
$submit.Click();
$ie.Quit();
I found in html code ID for user, pass, and "login" button
But it doesn;t work...
What can be wrong ?
Error
PS U:\> $user.value = "kolos"
Property 'value' cannot be found on this object; make sure it exists and is settable.
At line:1 char:7
+ $user. <<<< value = "kolos"
+ CategoryInfo : InvalidOperation: (value:String) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
PS U:\> $password.value = "lolos"
Property 'value' cannot be found on this object; make sure it exists and is settable.
At line:1 char:11
+ $password. <<<< value = "lolos"
+ CategoryInfo : InvalidOperation: (value:String) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
PS U:\> $submit.Click();
You cannot call a method on a null-valued expression.
At line:1 char:14
+ $submit.Click <<<< ();
+ CategoryInfo : InvalidOperation: (Click:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Thanks for any help and clue...