Extract a text from a <td> with Selenium + VBA

Asked

Viewed 368 times

-1

I am trying to extract the 'PRESI-VALEC' value from this element in Selenium, I thought to use Xpath as follows: .Findelementbyxpath("//a[contains(text(), 'PRESI-VALEC')]/table/tbody/tr[2]/td[3]"), however I did not succeed, someone could help me as to this?

inserir a descrição da imagem aqui

1 answer

0

I succeeded using the following function:

element = . Findelementbyxpath("//*[@id='divInfraAreaTabela']/table/tbody/tr[2]/td[3]"). Text

declare a variable -> element

extract the value of the Xpath element by adding the .Text in the end

Thanks to the one who gave unvote in the post, helped a lot!!

Browser other questions tagged

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