1

I have a text in div tag as "Robot Framework tutorials"

I wanted to highlight only "Robot" and mark it as bold using Robot framework.

Can anyone help me how to highlight the text ?

1

You can try selecting this text to highlight it. For example:

enter image description here

  1. Focus on the text you want to highlight
  2. Divide it into substrings and find which substring you want to highlight
  3. Select the substring to highlight it
  • *** Setting *** Library Selenium2Library Library String *** Test Cases *** Get subselection ${string}= Get Text xpath=/html/div ${substring}= Get Substring ${string} 25 35 I have used this code, and able to get substring but how to select it using robot framework – Uday Jan 23 '18 at 16:28
  • @Uday, from what I can recall, there is no established keyword that enables you to do it by default, but you can add your own keyword to Robot framework. – Yu Zhang Jan 23 '18 at 16:36
  • Yea that is what the problem, I am unable to select the text, need someone who is expert in Javascript to help me out on this – Uday Jan 29 '18 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.