Problem with automating Logon to a web site

Welcome Forums General PowerShell Q&A Problem with automating Logon to a web site

Viewing 0 reply threads
  • Author
    Posts
    • #180708
      Participant
      Topics: 11
      Replies: 13
      Points: 129
      Rank: Participant

      Hi,

      I'm trying to automate logging onto a web site and I can get the username and password entered with the following code:

      $ie=New-Object -Comobject 'InternetExplorer.Application

      $usernamefield = $ie.document.IHTMLDocument3_getElementByID('username')

      $usernamefield.value = $username  ........

      Where I am having an issue is with sending a click to the Login button.If I use by element or ID, it returns a null, I'm thinking it's not finding the button? 

      The html is in the following screenshot.

      https://github.com/Nick-Rimmer2016/Snippets/blob/master/2019-10-01%2016_12_39-Window.png

       

      Thanks

      Nick

       

Viewing 0 reply threads
  • The topic ‘Problem with automating Logon to a web site’ is closed to new replies.