jeudi 17 décembre 2015

How to run a Protractor test after click and content load finished?

I have this test code:

element(by.cssContainingText('a[ng-click="select()"]', 'Visual')).click()
browser.sleep(1000)
expect(element.all(by.tagName('angular-chart')).count()).toEqual(1);

But it hangs until timeout reach and then shows

Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

I suppose I need to wait for the content to load somehow then run the test?

If I replace the expect construct with the one below, it passes:

expect(true).toEqual(true)

Aucun commentaire:

Enregistrer un commentaire