Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
4.2k views
by
So, I have a scenario, where I am supposed to assert the string. And the string has a line break. So, how do I assert it?

Say, I need to assert

Then the element text contains 'S Sharma Help'

Actual text is

S Sharma

Help

So, How do I pass the line break?

1 Answer

0 like 0 dislike
by Master (1.2k points)
You really can't pass next line. Instead, I suggest you to use \n or you can use some character like :: and once you get the string in your step defination files, you can replace it with line break character.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...