Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5965694
CreateAccountPage.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
CreateAccountPage.js
View Options
'use strict'
;
const
Page
=
require
(
'./Page'
);
const
Util
=
require
(
'wdio-mediawiki/Util'
);
class
CreateAccountPage
extends
Page
{
get
username
()
{
return
$
(
'#wpName2'
);
}
get
password
()
{
return
$
(
'#wpPassword2'
);
}
get
confirmPassword
()
{
return
$
(
'#wpRetype'
);
}
get
create
()
{
return
$
(
'#wpCreateaccount'
);
}
get
heading
()
{
return
$
(
'#firstHeading'
);
}
get
tempPasswordInput
()
{
return
$
(
'#wpCreateaccountMail'
);
}
get
reasonInput
()
{
return
$
(
'#wpReason'
);
}
open
()
{
super
.
openTitle
(
'Special:CreateAccount'
);
}
/**
* Navigate to Special:CreateAccount, then fill out and submit the account creation form.
*
* @param {string} username
* @param {string} password
* @return {Promise<void>}
*/
async
createAccount
(
username
,
password
)
{
await
this
.
open
();
await
this
.
submitForm
(
username
,
password
);
}
/**
* Fill out and submit the account creation form on Special:CreateAccount.
* The browser is assumed to have already navigated to this page.
*
* @param {string} username
* @param {string} password
* @return {Promise<void>}
*/
async
submitForm
(
username
,
password
)
{
await
Util
.
waitForModuleState
(
'mediawiki.special.createaccount'
,
'ready'
,
10000
);
await
this
.
username
.
setValue
(
username
);
await
this
.
password
.
setValue
(
password
);
await
this
.
confirmPassword
.
setValue
(
password
);
await
this
.
create
.
click
();
}
}
module
.
exports
=
new
CreateAccountPage
();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 11:08 (1 w, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1d/aa/196ca803bc51e39a5b04ef784696
Default Alt Text
CreateAccountPage.js (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment