Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/07/2015, 21:22
i34a23
 
Fecha de Ingreso: agosto-2007
Ubicación: Santiago de Chile
Mensajes: 67
Antigüedad: 16 años, 8 meses
Puntos: 1
Respuesta: condicionar el resultado de un bucle for

Me auto respondo, agregue una variable de tipo boolean al resultado, de esta forma compruebo si dentro del for existe el atributo. lo dejo por si a alguien le sirve.

Código:
Dim CheckElement As Boolean
            For Each webpageelement As HtmlElement In allelements
                If webpageelement.GetAttribute("data-endpoint") = "/ajax/composerx/attachment/group/post/" Then
                    webpageelement.Focus()
                    webpageelement.InvokeMember("click")
                    CheckElement = True
                    Exit For
                End If
            Next

            If CheckElement = False Then
                Timer1.Stop()
                Label5.Text = 0
                StartPublish(ActualCount + 1)
                Exit Sub
            End If