Reputation: 11
I'm new to the protractor, thanks in advance to whoever answers my questions:
Upvotes: 1
Views: 310
Reputation: 13722
// Jasmine expect example
expect(some_ele.getText()).toEqual(some_text)
// Chai without using chai-as-promise
some_ele.getText().then(function(txt){
expect(txt).to.be(some_text)
})
// Chai use chai-as-promise together
expect(some_ele.getText()).to.be(some_text)
// When use await/async for Jasmine expect
expect(await some_ele.getText()).toEqual(some_text)
// When use await/async for Chai expect and without chai-as-promise
expect(await some_ele.getText()).to.be(some_text)
Upvotes: 1