Check if certain string is on page

293 Views Asked by At

How can I check if a page contains a certain piece of text with zombie.js? Do I just check the response and see if it has the string?

1

There are 1 best solutions below

0
On BEST ANSWER

If you don't use should you can do the following:

 assert browser.text('a:contains("Logout")')

If you use should.js you can do the following:

 browser.response.toString().should.include 'Logout'