Jackie James
Jackie James

Reputation: 853

How to parse string to get only desired text?

storeText ( locator, variableName ) 
${variableName}

If variableName contains value as 'Displaying 1 to 30 of 145300'. I need to parse this string and store a value 145300 in another variable. How is it possible ?

Upvotes: 1

Views: 1957

Answers (1)

Aleh Douhi
Aleh Douhi

Reputation: 1988

Command: storeEval
Target : '${variableName}'.split(' ').last()
Value  : result

Upvotes: 3

Related Questions