-1
I’m creating a code that enters my company’s online system, but it can only be accessed by Google Chrome.
The code to open Chrome is this:
Sub Chrome()
Dim GC As Object
Dim WebUrl As String
Dim NavigatorAddress As String
Let NavigatorAddress = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Set GC = CreateObject("InternetExplorer.Application")
Let WebUrl = "http://endereço/do/sistema"
Shell (NavigatorAddress & " -url " & WebUrl)
GC.Document.all("vUSU_CODIGO").innerText = "login"
GC.Document.all("vSENHA").innerText = "sennha"
GC.Document.all("vUSU_CODIGO").form.all("BUTTON1").Click
End Sub
The code opens Chrome on the right link and everything, but I can’t fill in the login or password.
No browser lets itself be manipulated as you want, for security reasons. If this were possible, there would be no operating system update or anti-malware that would account for all forms of attack that this would enable.
– Oralista de Sistemas
Puts, it’s understandable. Thank you.
– Leandro Felipe Moreira
Man use some vbs and Sendkeys that you can fill in user and password easily without using Selenium neither python nor anything vbs is like VBA a quick search by vbs sendkey and vc find what you need
– Nerd Laser