-2

Is the way to wait for page load with the protractor in Bootstrap App? I can not find good information about it.

Jonny
  • 19
  • 6

2 Answers2

0

first you should see if page is loaded which elements are appeared in page or what changes when page loaded, and expect that happen . there are many ways to check based on your application you can check if page url is changed and what is your expectation or by browser.waitForAngular(); wait for angular to load or for checking if DOM loaded or not execute a simple script and expect result in your protractor test something like: <body onload="script();"> and etc.

Fateme Fazli
  • 11,582
  • 2
  • 31
  • 48
0

There are two potions the ugly one and the good one .

  1. browser.sleep(time) which I highly discourage because your tests will fail if there is a network issues or your loading page time changes .
  2. the seconds option is to make brower.wait() you can learn more about it in the protractor doc which will give a promise and wait for it to be resolved .
Gengetsu
  • 39
  • 1
  • 9