Webscript VBA array specifies

Asked

Viewed 37 times

-1

all right?

I’m making a web scraping to update a spreadsheet of mine in vba. But the site I want to pull this information use td and tr and do not put class or id in the syntax.

For example:

I am using: ie.document.getelementsbytagname ("tr") (0). innertext

Since I have to keep guessing the name tag array until I get where I want, and other pages the array may be different.

A constant that always repeats itself is the content of the product I want to pick up. It’s always the same.

Is there any way to specify for him to get the TR in case I have my constant?

For example: ie.document.getelementsbytagname ("tr") (if constant 1). innertext.

1 answer

1

You are using Selenium?

But basically, you can take all the 'tr' elements and then perform a loop looking for their value.

If possible post your code, it is easier to pass a more specific answer.

Browser other questions tagged

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