Issue arises when clicking on the "Add Rule" button as new "Search Term" and "Search textarea" fields are generated, but Protractor is unable to detect them.
describe('Checking for two rules and search terms on "Add New Audience Rule" page', () => {
it('should have two rules and two search terms displayed', () => {
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.
Screenshot captured before and after clicking the "Add Rule" button: https://i.sstatic.net/WEc4x.png