Skip to content

Commit d9d43b3

Browse files
committed
필요없는 waitForSelector 제거
1 parent 5cf4a8e commit d9d43b3

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/app/naver/pageInteractor.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,13 @@ export default class PageInteractor {
5252
return "success";
5353
}
5454

55-
await this.page.waitForSelector("#direct_call");
56-
57-
const otpElementDisplayStyle = await this.page.$eval(
58-
"#remail_btn1",
59-
(button) => {
60-
if (!(button instanceof HTMLElement)) {
61-
return;
62-
}
63-
return button.style.display;
55+
const otpElementDisplayStyle = await this.page.evaluate(() => {
56+
const button = document.querySelector("#remail_btn1");
57+
if (!(button instanceof HTMLElement)) {
58+
return;
6459
}
65-
);
60+
return button.style.display;
61+
});
6662
if (otpElementDisplayStyle !== "") {
6763
return "otp-required";
6864
}

0 commit comments

Comments
 (0)