Display results as :
Advanced Search

Go down
Posts : 1
Join date : 2012-03-18

stored variable as an argument of uimap  Empty stored variable as an argument of uimap

on Sun Mar 18, 2012 7:18 am
Hi all,

Being a newby in Selenium and new at the forum - I was trying to find similar problem discussed earlier here and, honestly, - no results. So seems I am not going to be a pain in the neck Smile

I have the following snippet of code in the IDE:

storeXpathCount | ui=empMngmt::gridRow() | empCount
  opening form, fulfilling fields and submitting - row is added to the grid
assertText | ui=empMngmt::gridCell(rowIdx=javascript{storedVars['empCount'] + 1}, colName=firstName) | SomeName |

by executing the first line - I am storing number of rows in a grid to the empCount variable - it works fine. And let say the empCount holds now 8.
by executing the last line - I am trying to assert if the expected value is displayed in a grid cell from the just added row (empCount + 1). The grid cell locator is defined in an ui map and ...
... the problem is that the
javascript{storedVars['empCount'] + 1}
is not actually recognized as javasript. The UI-Element tab shows:

current specifier maps to locator:
//div[@class="datagrid-body"]/table[javascript{storedVars['empCount'] + 1}]/tbody/tr/td[@field="firstName"]/div

when I need it to be


The question is - how to use an arithmetic operation with stored variables in ui-map's arguments?

Great thanks in advance!
Back to top
Permissions in this forum:
You cannot reply to topics in this forum