Multifactor authentication
You have received a request to automate a platform authentication process.
The platform has a multifactor authentication mechanism and this mechanism requires providing:
- an email address,
- a code from an external page,
- a masked password. The steps on the test page have already been prepared by a manual QA. Your job is to implement
- a few methods in the SeleniumExecutor class, which should use the Selenium WebDriver to perform the
- below tasks on the page from the src/test/resources/__files/index.html page.
- In the
SetLoginAndClickNext(String login)
method: pass a variable to the login field and click theNext
button. - In the
OpenCodePageAndReturnCode()
method: open another page using the 'open page' link. Get the code from the opened page and return it. - In the
SetCodeAndClickNext(String code)
method: pass the taken code to the code field and click theNext
button. - In the
FillMaskedPasswordAndClickLogin(String password)
method: fill in the masked password fields and click the ‘Log in’ button. - In the
GetLoggedInText()
method: get the text displayed upon positive logging in.
- If you are using an in-browser editor, download the code in order to open the page locally. The files are in the src/test/resources/__files folder.
- Do not try to break/unblock/bypass the steps by changing the javascript.
- Be aware that the fields on the masked password page are randomly masked.
- You can assume that the page has already been loaded by the driver.