Problem is that when you click on "Add Rule" button you get new "Search Term" and "Search textarea" fields. But protractor can't see them.
it('On "Add new Audience Rule" page should have two rules and two
search Terms', () => {
audiencePage.addRule.click().then(() => {
expect(audiencePage.ORbutton.isPresent()).toBe(true);
expect(audiencePage.searchTerms.count()).toEqual(2);
});
});
Error log:
1) Audience page: On "Add new Audience Rule" page should have two rules and two search Terms
- Expected false to be true.
- Expected 1 to equal 2.
Does it work when you try it like this?
beforeAll(() => { audiencePage.addRule.click(); }); it('On "Add new Audience Rule" page should have an OR button', () => { expect(audiencePage.ORbutton.isDisplayed()).toBe(true); }); it('On "Add new Audience Rule" page should have two search Terms', () => { expect(audiencePage.searchTerms.count()).toEqual(2); });
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.