Implementing a CDN

Hello!
I am new to UI.Vision and have been slowly trying to figure it out please forgive me if this is a stupid question or has been posted before.
I have scoured the internet trying to figure out how to implement a cdn into the automation. I am basically trying to fill out a form with random test user data that I have stored on the cdn and enter it into the appropriate text fields. I know the cdn works because I have tested it by creating a button on a site that when clicked it will fill in the fields in the form. I hope to try to automate this and be able to use on any site that I need to test a lot of user data.
Any suggestions would be greatly appreciated.

Try starting on how you would do it manually and make the macros copy what you would do. For me it’s the best way to start. Then I can see some actions that could be made faster or better with some coding. :wink:

How is the data stored there? As CSV or JSON or…? An example link would be helpful.

Chance.js is basically what I am trying to use currently, specifically chance.first() or any of the fields that has to do with creating a person.
https://cdnjs.cloudflare.com/ajax/libs/chance/1.1.6/chance.min.js

That is interesting library! :slight_smile: I don’t think you can load chance.js directly into UIvision IDE, but you can open the https://chancejs.com/ website in a new tab, which loads chance.js => Then you can use executeScript to run any chancejs command. Then switch back to the other website.

You could move this code in a subroutine that you include with RUN, and/or store this info in global variables, then you can use these values in any macro.

Here is a demo:

{
  "Name": "chancejs",
  "CreationDate": "2020-6-11",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ui.vision/contact",
      "Value": ""
    },
    {
      "Command": "selectWindow",
      "Target": " TAB=OPEN",
      "Value": "https://chancejs.com/"
    },
    {
      "Command": "executeScript",
      "Target": "return chance.first();",
      "Value": "first"
    },
    {
      "Command": "executeScript",
      "Target": "return chance.email();",
      "Value": "email"
    },
    {
      "Command": "selectWindow",
      "Target": " TAB=CLOSE",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "firstname=${first}",
      "Value": "blue"
    },
    {
      "Command": "type",
      "Target": "id=ContactName",
      "Value": "${first}"
    },
    {
      "Command": "type",
      "Target": "id=Email",
      "Value": "${email}"
    },
    {
      "Command": "clickAndWait",
      "Target": "linkText=Send Message",
      "Value": ""
    }
  ]
}

It’s a round about way but it works! Thank you for your help! :slight_smile: