Store text from target with dynamic ID

Hi! I’m trying to store text from this website to a csv:

I want to store the text from each of the destinations showed. For example the first row in the csv should be: Cusco, Peru, from 30$

The problem is that when I use record to set the target for the storetext command, the id of the target changes completele everytime the page is refreshed.

I hope someone can help me with suggestions of how to do it.

Thank you!

Using OCR screen scraping is always an option, but here the XPATH:Position locator works, too:

The macro extracts “Peru”.

  "Name": "peru",
  "CreationDate": "2020-5-20",
  "Commands": [
      "Command": "open",
      "Target": "",
      "Value": ""
      "Command": "comment",
      "Target": "storeText // xpath=//*[@id=\"c5DiC\"]/button/div/div[2]/div[1]/div[1]",
      "Value": "ttt"
      "Command": "storeText",
      "Target": "xpath=//button/div/div[2]/div/div",
      "Value": "t"
      "Command": "echo",
      "Target": "${t}",
      "Value": "green"

thank you! It works for the first destination (the first rectangle), but when I try to capture the information for the second destination the “xpath=//button/div/div[2]/div/div” is the same as the other so it store the first one again. Is there a way to let the program know that it has to be the second match for the “xpath=//button/div/div[2]/div/div”.?

Thank you very much!

I found the way, just need to add [2] at the end of the path. Thank you very much!

Hi plankton! im trying to use “and” and “or” in a while and I can’t get it working. What should I write in the target? {loopcounter_departmonth} < {months} or {loopcounter_departyear} < {years}

Thank you very much!

Uivision Selenium IDE++ uses Javascript operators for the if or while statements.

  • and is &&, Example:(x < 10 && y > 1)
  • or is ||

Side note: The new version V5.7.3 records alternative selectors now. They are a great help, for example, for websites that change their IDs on reload. The Kayak side is a great example for this.