Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Unable to login to website,get error message : InvalidOperation: (Click:String)

$
0
0

Hi,

I tried the following script,it worked for my other task but not sure why it is not working here, pls help, below is the script:

 

$username = "username" 

$password = "password"

$servername = "abc"

$url = "www.somewebsite.com"

 $ie = New-Object -com InternetExplorer.Application 

$ie.visible=$false

$ie.navigate("www.somewebsite.com") 

while($ie.ReadyState -ne 4) {start-sleep -m 100} 

$ie.document.getElementById("Iu523o2").value= "$username" 

$ie.document.getElementById("I689005").value = "$password"

$ie.document.getElementByid("$l4230a").click() 

$content = $ie.Document.body.innertext | Out-String

echo $content 

 

Pls let me know where I am wrong or is there anything that I have overseen. Pls guide me, this is critical.


Viewing all articles
Browse latest Browse all 6937

Trending Articles