Debian Codegraph @

tests/selenium/docs/Stack/pageobjects/main.page.js

raw symbols SCIP
1 // Example code for Selenium/Explanation/Stack
2 // https://www.mediawiki.org/wiki/Selenium/Explanation/Stack
3
4 'use strict';
5
6 const Page = require( './page' );
7
8 // baseUrl is required for our continuous integration.
9 // If you don't have MW_SERVER and MW_SCRIPT_PATH environment variables set
10 // you can probably hardcode it to something like this:
11 // const baseUrl = 'http://localhost:8080/wiki/';
12 const baseUrl = `${ process.env.MW_SERVER }${ process.env.MW_SCRIPT_PATH }/index.php?title=`;
13
14 class MainPage extends Page {
15 get login() {
16 return $( 'li#pt-login-2 a' );
17 }
18
19 async open() {
20 await super.open( `${ baseUrl }Main_Page` );
21 }
22 }
23 module.exports = new MainPage();