Save part of a text in a Selenium IDE variable

Asked

Viewed 1,494 times

3

I have the following text::

Criado por Comprador em 14/05/2015 - 16:18

I would like to save in a variable only the part 14/05/2015 - 16:18

Could someone give me a light on how to do in Lenium IDE ?

2 answers

2

  • Maicon...by which I understood in these examples...it separates a part of each text.. in 2 variables...but I would like to put the text "14/05/2015 - 16:18" within a single variable....

0

What you can do is add a limiter to this string for example a - or | and in the code do the following:

store  | Criado por Comprador em | 14/05/2015 - 16:18 | string
store  | 0 | delimiter1
store  | javascript{storedVars['test'].split('|')[storedVars['delimiter1']]} | output
echo   | ${output}

And with this you take the array that will reotrnar two positions and uses only the second that will contain the date and time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.