1
I have a VBA code but I’m having problems to the popular one element.
When having put data in control appears the following error message:
runtime error '2146233079 (80131509)': Unknown error: cannot Focus element...
Sub x()
Dim objCollection
Dim numeroPregao, dataAssinatura, uasg, item, val, m
Dim c As Integer
Dim ULogin As Boolean, ieForm
Dim MyPass As String, MyLogin As String
Dim driver As New SeleniumWrapper.WebDriver
Dim windowHandleJanelaInicial As String
ctr = 2
For y = 0 To 13680 'vai de zero ao numero de linhas a ser prenchido
m = 0
c3 = 1
c2 = 1
driver.Start "chrome", "http://comprasnet.gov.br"
driver.setImplicitWait 5000
driver.Open "/acesso.asp?url=/Livre/Ata/ConsultaAta00.asp"
Set objCollection = driver.findElementByCssSelector("frame[name='main2']")
driver.SwitchToFrame (objCollection)
driver.FindElementByName("dt_ini").SendKeys "25/11/2015"
driver.FindElementByName("dt_fim").SendKeys "24/11/2015"
driver.FindElementByXPath("//option[text()='<Escolha pelo menos um material ou serviço>']").SendKeys "222345" 'o erro ocorre aqui
Doing a debug, where the error is?
– Evert
in the last line 'the error occurs here
– Daniel Aristofanes
I believe the labeled xpath is wrong...
– Daniel Aristofanes