File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -128,10 +128,11 @@ export class StorageUtils {
128128 await this . page . locator ( '#ftpuser' ) . fill ( BACKWPUP_INFOS . ftp . username ) ;
129129 await this . page . locator ( '#ftppass' ) . fill ( BACKWPUP_INFOS . ftp . password ) ;
130130 await this . page . locator ( '#ftphostport' ) . fill ( BACKWPUP_INFOS . ftp . port ?? '21' ) ;
131- // Checkboxes
132- // Only set SSL checkbox if the SSL option checkbox element exists and is visible
133- const sslCheckboxVisible = await this . page . locator ( '#ftpssl' ) . isVisible ( ) . catch ( ( ) => false ) ;
134- if ( sslCheckboxVisible ) {
131+ const ftpType = BACKWPUP_INFOS . ftp . ssl ? 'ftps' : 'ftp' ;
132+ await this . page . locator ( '#ftpcontype' ) . selectOption ( ftpType ) ;
133+ // Only set passive mode checkbox if the passive mode option checkbox element exists and is visible
134+ const passiveCheckboxVisible = await this . page . locator ( '#ftppasv' ) . isVisible ( ) . catch ( ( ) => false ) ;
135+ if ( passiveCheckboxVisible ) {
135136 await this . page . locator ( '#ftppasv' ) . setChecked ( BACKWPUP_INFOS . ftp . passiveMode , { force : true } ) ;
136137 }
137138 const timestamp = Date . now ( ) ;
You can’t perform that action at this time.
0 commit comments