Extracting two information via Selenium and pasting into only one cell in excel

Asked

Viewed 751 times

0

I’m trying to extract some web information Via Selenium, the point I’m catching is this: I can direct the information from Selenium searched on the internet and save it within a specific cell, but what I need would be, that in a query two fields were searched and the information was played to only one cell, separating them by space. Any suggestions?

Follow an example:

'Logradouro

  Sheets("CONSULTA").Cells(Lin, 6) = selenium.findElementByXPath("//tr[7]/td").Text

I tried it this way:

'Logradouro

  Sheets("CONSULTA").Cells(Lin, 6) = selenium.findElementByXPath("//tr[7]/td", "//tr[8]/td").Text

But without success, the information in this way appears blank.

  • Is it too ugly to do so? string.Format("{0} {1}", selenium.findElementByXPath("//tr[7]/td").Text,
selenium.findElementByXPath("//tr[8]/td").Text);

  • Try (//tr)[7]/td

  • Thank you very much, it worked (Y)

No answers

Browser other questions tagged

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