Typing variable(s) from Array not working. Selenium works just fine though

Hello, this is my first post so don’t grill me. :slight_smile:

I’m trying to rework a small scrip that I wrote in Selenium so it works with Katalon but I’m struggling with typing stored variables from an Array.

My code in Selenium works and looks like this:

In Katalon the code is looking almost identical but it doesn’t work:

I can see that he grabbed the data that I entered in the popup box and stored them accordingly in a:

I’m struggling at this point, because I don’t know how I can replicate the same handling as in Selenium.

Maybe someone is smarter (everyone ;)) than me and can help out?

Thanks and Regards

Hi, take a look a this post, point 6:

Hi Piotr,

thank you very much.
Does this mean I’ve to map all by hand? My Data that I enter in the popup is quite massiv (40+) sometimes.
Are you able to help me if I misunderstood it?


If you don’t need specific name for each variable you can use while loop to go from 1 to 40 and in each iteration you can save it something like this:

I’m not sure it will work. I never need this.

It’s not working.
I’m receiving the error:
[error] Error: ReferenceError: a is not defined

I’m not the greatest coder >_<

in loop variable store 0 instead of 1 because elements in JavaScript array are numbered from 0 and be sure to use proper ending condition in while, like: <= or < or =

If I run the exact same code I’m still receiving an error:
[error] Threw an exception: Unexpected token ‘{’

If I look at the screenshot the log posts, it look like yours wich seems to be fishy as the log says something completely different and also the variables looks like they should.
I’m sooo lost >.<

You don’t give enough info. I don’t know in which line you have this error, show a screenshot of your log.

And the second thing is I have a variable tab open not log so yes, it may look diffrent :smiley:

Hi Piotr, thanks and you’re absolutely right, sorry for that.

Here’s my log:

I’m really baffled that I can’t use my script without mods. I thought that was a big point also advertised by Katalon (I’m only frustrated, don’t gibe too much about it ^^).

In second storeEval (this red one) you have “lopp” instead of “loop” :slight_smile:

Oh jesus, I’m blind…
thanks, that solved the loop but now I’m stuck at where do I put my script so I can enter my script so I can enter my values and loop take care of storing those values into the array… sorry, I’m sooooo stupid and blind. :frowning:

I help you with loop but i don’t see your testcase so I have know idea what you are trying to achive. Can you show your testcase?

I want to use Katalon not for a testing suit, let’s get this out of the way but for a help for me and my team as we need to enter quite a bunch of numbers on a form (different every time, up to 50+).
I chose Katalon over Selenium as I don’t need an entry point like Selenium does.

In Selenium it looked like this:

In Katalon I’ve this:

First of all I need to capture the split data from my script and store it into the array but, if i can see right the addscript initiate the test like “first” as a string. So I changed that to numbers but that doesn’t seem right to enter ther numbers as sometimes we’ve to enter 50 into a form and on another form it’s 60.

I hope that helps.