Multiple Variables

xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘$2.66’])[5]/following::button[1]

The above code has the price of $2.66 as I am using this to print shipping labels. The issue is some labels are different prices like $2.70, $3.09 etc. How can I get this code to go to the next step no matter the price listed?

Or better is there a way to just add the prices in the like; $2.66, $2.70, $3.09 etc.?


Change the xpath for something more precise. Don’t look (directly) for the price, but for e.g. css class/ids where that price is.


you can .modify Object Property values are change to “i”. now you can change object property.

xpath=(.//*[normalize-space(text()) and normalize-space(.)=$i])[5]/following::button[1]

newindex = WebUI.modifyObjectProperty(findTestObject(‘xpath folder/…/’), ‘xpath’, ‘equal’,
(’.//*[normalize-space(text()) and normalize-space(.)=’$+ i +’])[5]/following::button[1]’, true)

outputtype = WebUI.getText(newindex).value