Felipe Barbosa
Felipe Barbosa

Reputation: 11

How can i store text between "<br>" into a variable in Selenium IDE

I have this part of a code:

"<div> class="OSInline" style="width: 100%">
<span data-webbtests="CompraWeb.Request_Edit.AddressWB.expCompanyAdress">
Praça Henrique Lavoie Júnior, 701
<br>
Irajá - Rio de Janeiro - RJ - 21231-200
 </span>
/div>"

I want to put into a variable the text between br tags like this:

Praça Henrique Lavoie Júnior, 701 Irajá - Rio de Janeiro - RJ - 21231-200

If I use storeText I get this result:

Praça Henrique Lavoie Júnior, 701 

Irajá - Rio de Janeiro - RJ - 21231-200

Can anybody help me ?

Upvotes: 1

Views: 602

Answers (1)

Mahsum Akbas
Mahsum Akbas

Reputation: 1583

You can do that: Command: storeText Target: css=span Value: your_variable

when you print with echo command, you will see text without break. in my logs: [info] echo: Praça Henrique Lavoie Júnior, 701 Irajá - Rio de Janeiro - RJ - 21231-200

Upvotes: 2

Related Questions