2021-03-30 17:50:16 +00:00
|
|
|
// Example code for Selenium/Explanation/Stack
|
|
|
|
|
// https://www.mediawiki.org/wiki/Selenium/Explanation/Stack
|
|
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
const Page = require( './page' );
|
|
|
|
|
|
|
|
|
|
// baseUrl is required for our continuous integration.
|
|
|
|
|
// If you don't have MW_SERVER and MW_SCRIPT_PATH environment variables set
|
|
|
|
|
// you can probably hardcode it to something like this:
|
|
|
|
|
// const baseUrl = 'http://localhost:8080/wiki/';
|
|
|
|
|
const baseUrl = `${ process.env.MW_SERVER }${ process.env.MW_SCRIPT_PATH }/index.php?title=`;
|
|
|
|
|
|
|
|
|
|
class MainPage extends Page {
|
|
|
|
|
get login() {
|
|
|
|
|
return $( 'li#pt-login-2 a' );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async open() {
|
2024-09-11 09:05:18 +00:00
|
|
|
await super.open( `${ baseUrl }Main_Page` );
|
2021-03-30 17:50:16 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
module.exports = new MainPage();
|