I am unable to go to the "main2" frame. VBA and Selleniumwrapper

Asked

Viewed 190 times

0

I am trying to access a web page and manipulate its controls via VBA and Selennium Wrapper, however, these controls are within a frame with the "name = main2", follows the code VBA:

Sub z()
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


    driver.Start "chrome", "http://comprasnet.gov.br"
    driver.setImplicitWait 5000
    driver.Open "/acesso.asp?url=/Livre/Ata/ConsultaAta00.asp"


    driver.SwitchToFrame ("main2")
    driver.FindElementByName("dt_ini").SendKeys "25/11/2015"



End Sub

Thank you in advance! Merry Christmas and a New Year to all!

  • if you found it useful to vote for the answer! rs

1 answer

0


I was able to select the frame and make the interaction, the code was like this:

Set objCollection = driver.findElementByCssSelector("frame[name='main2']")
    driver.SwitchToFrame (objCollection)

    driver.FindElementByName("dt_ini").SendKeys "25/11/2015"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.