Skip to content

Commit 0f1a9bf

Browse files
committed
PageInteractorfillCaptchaInput 메소드 추가
본 커밋은 캡챠 로그인 대응을 위해 해당 메소드를 추가합니다.
1 parent 9118356 commit 0f1a9bf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/app/naver/pageInteractor.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ export type LoginEvent =
77
| "manual-otp-required"
88
| "unexpected";
99

10+
export interface CaptchaStatus {
11+
readonly imageData: string;
12+
readonly question: string;
13+
}
14+
1015
export default class PageInteractor {
1116
private _fullyLoaded = false;
1217

@@ -104,6 +109,17 @@ export default class PageInteractor {
104109

105110
return data || null;
106111
}
112+
113+
async fillCaptchaInput(answer: string, password: string) {
114+
const captchaElement = await this.elementParser.parseCaptchaInputElement();
115+
if (!captchaElement) {
116+
throw new Error("captcha input element not found");
117+
}
118+
await captchaElement.type(answer);
119+
120+
await this.typeLoginInfo("", password, 200);
121+
}
122+
107123
async loadMoreHistory() {
108124
if (this._fullyLoaded) {
109125
return;

0 commit comments

Comments
 (0)