My simple assertion for robot framework is :
Page Should Not Contain Master Admin Panel
But this test passes even when the string "Master Admin Panel" is visible on the page. Upon investigation I found that the HTML code has return character in it
<a href="/admin/" class="top" style=" text-decoration: none">Master
Admin
Panel</a>
Since it is not a straight ">Master Admin Panel<" , Robot is not able to catch it. Is there any way I can make Robot Framework to catch this and make the test Fail?
If it doesn't contain any return characters like <*br /> but the result is in this format
Master
Admin
Panel
then you can use this
Page Should Not Contain Link Master Admin Panel
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.