Page MenuHomeWickedGov Phorge

protect.page.js
No OneTemporary

Size
629 B
Referenced Files
None
Subscribers
None

protect.page.js

'use strict';
const Page = require( 'wdio-mediawiki/Page' );
class ProtectPage extends Page {
get reason() {
return $( '#mwProtect-reason input' );
}
get editProtectSelect() {
return $( '#mwProtect-level-edit select' );
}
get submit() {
return $( '#mw-Protect-submit' );
}
async open( title ) {
return super.openTitle( title, { action: 'protect' } );
}
async protect( title, reason, editProtect ) {
await this.open( title );
await this.reason.setValue( reason );
await this.editProtectSelect.selectByVisibleText( editProtect );
await this.submit.click();
}
}
module.exports = new ProtectPage();

File Metadata

Mime Type
text/plain
Expires
Aug 18 2026, 13:19 (4 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
08/4c/fb4ceb19c4bc6792f0def6d208b8
Default Alt Text
protect.page.js (629 B)

Event Timeline