でPromise.allを使用します。私はPromise.all のように使用したい:変更方法は、私は次のような方法を持っているtypescriptです
public static zoomInMap(times: number): Promise<any> {
return Promise.all(?) // ? I do not know how to do it
for (let i = 0; i < times; i++) {
let zoomInButton = element(by.css('#main > cc-map > div.google-map-base-container-inner > div > div.gmnoprint.gm-bundled-control.gm-bundled-control-on-bottom > div:nth-child(1) > div > div:nth-child(1)'));
zoomInButton.click();
browser.sleep(Config.ZOOM_ANIMATION_TIMEOUT).then(() => {
// console.log('Map Zoomed In');
});
}
}
にはどうすればPromise.allを使用するようにコードを手直しする必要があります。不明な質問に申し訳ありません。