File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ export type LoginEvent =
7
7
| "manual-otp-required"
8
8
| "unexpected" ;
9
9
10
+ export interface CaptchaStatus {
11
+ readonly imageData : string ;
12
+ readonly question : string ;
13
+ }
14
+
10
15
export default class PageInteractor {
11
16
private _fullyLoaded = false ;
12
17
@@ -104,6 +109,17 @@ export default class PageInteractor {
104
109
105
110
return data || null ;
106
111
}
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
+
107
123
async loadMoreHistory ( ) {
108
124
if ( this . _fullyLoaded ) {
109
125
return ;
You can’t perform that action at this time.
0 commit comments