I'm working on a web page that uses Knockout. I set up Protractor after seeing this post about using Protractor on non-Angular pages, but it doesn't seem like Protractor can 'see' any elements that are part of a KO component.
describe('a simple test', function () {
it('works', function () {
browser.ignoreSynchronization = true;
browser.get('profile');
expect(browser.getTitle()).toEqual('Title'); // this passes (outside KO)
expect(element(by.id('ko-component')).getText()).toEqual('Hello World!'); // this fails (inside KO)
});
});
The second assertion results in this error, even though the element is definitely in the HTML.
Message:
NoSuchElementError: No element found using locator: By.id("ko-component")
If I can't use Protractor, then suggestions for other e2e testing frameworks are welcome.