Sunita
Sunita

Reputation: 19

How to get span tag value using robot framework?

This is the HTML Code:

<div class="near-matches">
 
  <b class="item">8</b> ==$0

I am trying to get value '8' using xpath and get text keyword in robot framework but it is not returning any value. This is what i tried.

${response}    get  text    xpath=//b[@class="item"]
Log    Num Value is ${response}

But this is not returning any value. I would really appreciate the help.

Upvotes: 0

Views: 2635

Answers (1)

S. Kağan Cin
S. Kağan Cin

Reputation: 116

Can you try this?

${value} =  Get Text  css=b.item
Log To Console  ${value}

Upvotes: 2

Related Questions