Hello,
I get "Object required" debug error for line: "arrData = tbl.Data", 7th from bottom.
after I started calling Maybe_So method. What I have to write, where to declare object and what object?
Thank you.
Sub Gordon()
Dim bot As New ChromeDriver, tbl As TableElement
bot.Get "http://site.com"
bot.FindElementByName("tbLoginName").SendKeys ("*******")
bot.FindElementByName("tbPassword").SendKeys ("*******")
bot.FindElementByName("btnLogin").Click
bot.FindElementByName("ctl00$box_11$tbQuickSearch").SendKeys Sheet1.Cells((Sheet2.Cells(1, 3)), 2)
bot.FindElementByName("ctl00$box_11$btnQuickSearch").Click
bot.FindElementByXPath("//*[@id='sM_uq_id_0']/div[2]/h2/a").Click
cAge = bot.FindElementByXPath("//*[@id='main_head_container']/h1").Text
ThisWorkbook.Sheets("Sheet2").Range("A5").Value = cAge
bot.FindElementByXPath("//*[@id='partscatalogoue_article_tab']/ul/li[3]").Click
Set tbl = bot.FindElementByClass("partoecodescontrol").AsTable
Call Maybe_So
End Sub
Sub Maybe_So()
Dim arrData(), arr1, i As Long
arrData = tbl.Data
ReDim arr1(1 To UBound(arrData) - 1)
For i = 2 To UBound(arrData)
arr1(i - 1) = arrData(i, 2)
Next i
ThisWorkbook.Sheets("Sheet2").Range("B5") = Join(arr1, ", ")
End Sub
Bookmarks