4

I am new-ish to Selenium, so I use Katalon Automation Recorder through Chrome to quickly draft scripts.

I have a script that makes an account on a website, but I want to make more than one account at a time (using a catchall). Is there a way for Selenium/Katalon to alternate its input from a database of preset emails (CSV sort of thing) or even generate random values in-front of the @domain.com each time the script loops over?

Here is the current state of the script: katalon script

Thanks

Mate Mrše
  • 6,305
  • 6
  • 26
  • 53
M. Davis
  • 96
  • 7
  • 3
    What you are talking about is basically Data driven testing. Google it, try it out and then post questions if you have any kind of difficulty. – Shivam Mishra Jul 29 '18 at 08:39

1 Answers1

2

As @Shivan Mishra mentioned, you have to do some data driven testing. In Katalon you can created test data in object repository (See https://docs.katalon.com/katalon-studio/docs/manage-test-data.html)

You can manage your test data in script like following example:

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

def data = findTestData('path/to/your/testdata/in/object repository')

for(int=0;i<data.getRowNumbers();i++){
 def value = data.getValue(1, i)
    // do any action with your value
}
JanZ
  • 549
  • 2
  • 13