Converting from IMacros to UIVision

Converting this iMacro macro to ui vision should be straightforward. Some starting points:

To extract the URL, use storeattribute

To extract text, use storeText

Ui vision has many web scraping commands.

To save the extracted data to a csv file use

  • storeText | xpath=YourXpathHere | !csvline
  • storeText | xpath=AnotherTextXpath | !csvline
  • csvSave | mytable.csv

csvSave saves the values of the !csvline internal variable to a csv file. It creates one line per csvSave call. So it does the same as the SAVEAS TYPE=EXTRACT thing.

For the loop, have a look at the TIMES command.

Selectors:

A tricky change is that you need to replace the iMacros ATTR=ID:ctl00_ctl00_Page..._ctrl0_HyperLink1 thing with a regular Xpath as used by Selenium IDE, Ui.Vision and most other tools.

Method 1: Ui.Vision uses XPaths for element selection, so you’ll need to adjust the XPaths. In this case you can try to simply use (//*[@id='...'] ).

So for example it would be storeText | xpath=//*@id=ctl00_ctl00_Page..._HyperLink1] | !csvline to match the specific element in your web page.

Method 2: Alternatively, you can simply re-record the sequence with Ui.Vision. The app will then create CLICK commands with the Xpath selectors for you :slight_smile: Then, replace the CLICK command with the storeText command (= both use the same selector).

If you get stuck at some point during the imacros to ui.vision conversion, just ask again :wink: