Protractor, when should I use then() after a click()

前端 未结 2 374
悲&欢浪女
悲&欢浪女 2020-12-15 00:25

I\'m running an Angular app and when testing on protractor a click(), I don\'t know when should I resolve the promise with a then().

I foun

2条回答
  •  囚心锁ツ
    2020-12-15 01:17

    Yes, you should. Maybe right now it's not necessary, but maybe in next versions it is. So, if click return a promise, you should use it.

    http://www.protractortest.org/#/api?view=webdriver.WebElement.prototype.click

提交回复
热议问题