0
My code tries to copy from the windows Clipboard and paste into the site ID with VBA + Selenium.
Option Explicit
Public Sub PasteInfo()
Dim d As WebDriver, clipboard As Object, data As String
Set d = New ChromeDriver
Const url = "http://novosiebel.intranet.com.br"
d.Wait 20000
With d
.Start "Chrome"
.Get url
[A1].Copy
Set clipboard = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
With clipboard
.GetFromClipboard
data = .GetText
End With
.FindElementById("1_SR_Number").SendKeys data
Stop
.Quit
End With
End Sub
it opens the site, I put the login and password, I click on the tab to enter but at the end of the execution it
erro de tempo de execução '7': NoSuchElementError Element not found for id=1-SR-Number
Do you have any idea what might be going wrong?