selenium: Upgrade from webdriver v4 to v5
[lhc/web/wiklou.git] / tests / selenium / pageobjects / restore.page.js
1 const Page = require( 'wdio-mediawiki/Page' );
2
3 class RestorePage extends Page {
4 get reason() { return $( '#wpComment' ); }
5 get submit() { return $( '#mw-undelete-submit' ); }
6 get displayedContent() { return $( '#mw-content-text' ); }
7
8 open( subject ) {
9 super.openTitle( 'Special:Undelete/' + subject );
10 }
11
12 restore( subject, reason ) {
13 this.open( subject );
14 this.reason.setValue( reason );
15 this.submit.click();
16 }
17 }
18
19 module.exports = new RestorePage();