your next line is code example
Example 1: how to give the next line in protractor
invoice.getText().then(function (text) {
expect(text.replace(/\n/, '')).toBe('This is my URL');
})
Example 2: how to give the next line in protractor
it('Description' async function(){
//your code
expect(await invoice.getText()).toBe('This is\n'+ 'my URL');
})
Example 3: how to give the next line in protractor
expect(invoice.getText()).toMatch('This is\s+my URL');