Variables in index
Posted: Wed Apr 04, 2012 9:02 am
Hello!
I have a problem with access to an element in the sample. Suppose we have xpath /treeitem[@accessibledefaultaction='Expand'] which gives us two elements. To access the first, we can use /treeitem[@accessibledefaultaction='Expand'][1] but I want to use variables.
/treeitem[@accessibledefaultaction='Expand'][$number]
/treeitem[@accessibledefaultaction='Expand'][@index=$number]
Why is this option not working?
I have a problem with access to an element in the sample. Suppose we have xpath /treeitem[@accessibledefaultaction='Expand'] which gives us two elements. To access the first, we can use /treeitem[@accessibledefaultaction='Expand'][1] but I want to use variables.
/treeitem[@accessibledefaultaction='Expand'][$number]
/treeitem[@accessibledefaultaction='Expand'][@index=$number]
Why is this option not working?