New to browser automation here. I am trying to open a webpage and browse a list of entries. The bot has to open the first one , execute some tasks ,once done proceed to the next entry until the end. Can someone with exp. give some hints. Thanks a ton.
I get a "object doesnt support this method" error at "For Each tblent In tbl"
Cant share the full html due to corporate security Thank you
I get a "object doesnt support this method" error at "For Each tblent In tbl"
Cant share the full html due to corporate security Thank you
VBA Code:
Option Explicit
Public Sub xyz_Bot()
Dim pause1 As String
pause1 = "00:00:10"
Dim pause2 As String
pause2 = "00:00:30"
Dim url As String
url = "http://xyz/"
Dim driver As New webdriver
Dim rowc, cc, columnC As Integer
Dim tbl As Object
Dim tblent As Object
''''''''''''''''''''''''''''
'Log in to xyz
''''''''''''''''''''''''''''
driver.Start "Chrome"
driver.Window.Maximize
driver.Get url
Application.Wait Now + TimeValue(pause1)
''''''''''''''''''''''''''''
'Find abc
''''''''''''''''''''''''''''
driver.FindElementByXPath("/html/body/div[2]/div[1]/ul/li[5]/ul/li[4]/a/span").Click
Application.Wait Now + TimeValue(pause1)
''''''''''''''''''''''''''''
'Filter bca
''''''''''''''''''''''''''''
driver.FindElementByXPath("/html/body/div[2]/div[2]/div[2]/div[2]/div/div/div[1]/div[2]/div/div[2]/div[3]/div[2]/select").AsSelect.SelectByText ("Renewal")
driver.FindElementByXPath("/html/body/div[2]/div[2]/div[2]/div[2]/div/div/div[1]/div[2]/div/div[1]/div[5]/button[1]").Click
Set tbl = driver.FindElementByXPath("/html/body/div[2]/div[2]/div[2]/div[2]/div/div/div[2]/div[1]/table")
For Each tblent In tbl
Debug.Print tblent.Text 'here the bot is going to do stuff
Next tblent
End Sub