C
C
coderisimo2017-04-30 12:28:06
Software testing
coderisimo, 2017-04-30 12:28:06

Why is the first element not read from a file with *.json variables in selenium ide and selblocks?

I use selenuim ide and selblocks.
I load variables from a json file, it looks like this:


[
{idiotizm : 'idiotizm'},
{password : 'pppp'},
{login : 'aaaaa'},
{testDealTitle : 'test_al_x4_745784'},
{uncompletetestDealTitle : 'unc_t_deal_x4_745784'}
];

The test itself looks like this:

forJson file://c:/****/vars.json
endForJson
echo ${password}
echo ${idiotizm}
echo ${login}

when I run it, I see this in the log:
[info] [selblocks] branch => @1: [forJson|file://c:/****/vars.json]
[info] Executing: |forJson | file://c:/****/vars.json | |
[info] [selblocks] branch => @2: [endForJson]
[info] Executing: |endForJson | | |
[info] Executing: |echo | ${password} | |
[info] echo: pppp
[info] Executing: |echo | ${idiotism} | |
[info] echo: ${idiotizm} // - this variable is not available !
[info] Executing: |echo | ${login} | |
[info] echo: aaaaa
i.e. the ${idiotizm} variable is not available. found out that the first element in the json file is always ignored. Can you suggest why? Tired of dancing with a tambourine.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
coderisimo, 2017-11-25
@coderisimo

in general, used a fake first value. Maybe not pretty, but it worked :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question