problem to popular an option control type

1

I have a VBA code but I'm having trouble popping an element.

When you have put data in the control the following error message appears:

Run-time error '2146233079 (80131509)': unknown error: can not 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
    
asked by anonymous 26.12.2016 / 18:36

1 answer

0

I got around to making my mistake! the problem was occurring because the control I was trying to manipulate was not "accessible."

The way you clicked the "select" button and interacted with the material selection     

02.01.2017 / 15:29