mmbhatti
New Member
- Joined
- Mar 5, 2023
- Messages
- 8
- Office Version
- 365
- 2019
- 2016
- 2010
- 2007
- 2003 or older
- Platform
- Windows
- MacOS
- Mobile
- Web
Hello Excel Experts ;
I am scrapping some data from webpage. Data is to fetch one by one according to the values stored in column A of osh sheet. For this, I write a selenium command of FindbyXpath in a loop. Take a look at this code please
For index = 2 To osh.Cells(Rows.Count, 1).End(xlUp).Row
osh.Range("D" & index).Value = cd.FindElementByXPath("//td[.=osh.Cells(index,1).Value]/parent::tr/td[8]").Text
Next index
It is generating error
It means that The refer code osh.Cells(index,1).Value is not a correct way to get values from sheet column and put it an
cd.FindElementByXPath("//td[.="Formula To Refer"]/parent::tr/td[8]").Text
Can anyone guide me a correct way to write this?
I am scrapping some data from webpage. Data is to fetch one by one according to the values stored in column A of osh sheet. For this, I write a selenium command of FindbyXpath in a loop. Take a look at this code please
For index = 2 To osh.Cells(Rows.Count, 1).End(xlUp).Row
osh.Range("D" & index).Value = cd.FindElementByXPath("//td[.=osh.Cells(index,1).Value]/parent::tr/td[8]").Text
Next index
It is generating error
It means that The refer code osh.Cells(index,1).Value is not a correct way to get values from sheet column and put it an
cd.FindElementByXPath("//td[.="Formula To Refer"]/parent::tr/td[8]").Text
Can anyone guide me a correct way to write this?