Display results as :

Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c


stored variable as an argument of uimap

View previous topic View next topic Go down

stored variable as an argument of uimap

Post by latim 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!


Posts : 1
Join date : 2012-03-18

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum