I wrote following condition in Protractor test:
expect(dialog.getAttribute('style')).toContain('display: none');
That raises an error:
Expected [ 'display: none; width: 400px;' ] to contain 'display: none'.
So, I've tried to add a call to .toString()
method after getAttribute, but it returns `[object Object]'. The error is as follows:
Expected '[object Object]' to contain 'display: none'.
I've tried answers posted here: Converting an object to a string but they seems to not work but they're also not working.
How should I amend my code, so that test will pass?