How Do I Provide Login Information for a Web Page Based Login?
Web page based logins use HTML form elements to post the login information back to the web server. Our Website Standard monitor type allows you to configure HTML form field data, such as login form values, into each test the monitor performs.
Most people that want to configure login information for a web page based login are looking to have the monitor not only login, but also test a specific page of the private website after it logs in. To support this, your login page must support the ability to provide a forwarding URL that the user is automatically forwarded to after login. Most login pages support this feature. If you are not sure if yours does, please ask your web developer. If your web page based login supports this feature, then our system will be able to test that next page after login. If not, you will only be able to test the login page itself.
To configure your Website Standard monitor to process a web page based login, you must perform the following steps:
- Edit your Website Standard monitor and open the Test Scenario edit page.
- Enter the URL for the webpage based login, into the URL field. Make sure the URL you enter includes the query string value that tells the login page where to redirect the user after login. If you’re not sure of how this is included in the login page URL, please ask your web developer.
- Select the “True” value from the Follow Redirects drop down list field.
- Select the “POST” value from the Method drop down list field.
- In the Post Data field you must input all the login form field elements found in your login pages HTML between the HTML elements. To find these form elements, you need to view the HTML for your login page. In the page HTML, you will find HTML tags for each of the form’s input fields. These form fields can usually be identified by finding the FORM and INPUT tags on the page. See the paragraph later in this article for an example of the HTML page. Once you have collected all the form element names and the corresponding values (login credentials) you want to use, input them into the Post Data field in the following format:
**Example Post Data Format: **
username=johndoe&password=Pass1234& accountid=546721&loginbutton=Login
In this example, you will see that the format for the Post Data field consists of name-value pairs joined together by Ampersand signs (with no spaces in-between). The first name-value pair is “username= johndoe”; the second name-value pair is “password=Pass1234”; and so on. The field names used in this example are “username”, “password” and so on; while the values used are “johndoe” and “Pass1234” and so on.
Note that the field names used in this example were not chosen at random. They are the names of the fields found in the HTML. These names will vary from login form to login form, so make sure the field name for each name-value pair matches up to the “name” properties of the HTML form elements on your login page.
The following example demonstrates what the HTML field elements may look like on a web page base login corresponding to the Post Data example above. Note that the “name” properties match up to the name portion of the name-value pairs in the example above:
**Example HTML Found on Login Webpage: **
<FORM method="post" action="loginpage.php">
<INPUT size=15 name=username>
<BR>
<INPUT type=password size=15 name=password>
<BR><BR>
<INPUT type=hidden value=546721 name=accountid>
<INPUT type=submit value=Login name=loginbutton>
</FORM>
If you have any problems configuring your monitor to be able to login to your website, please feel free to contact our Help Desk. Please provide use with a temporary working login for your login page and we will happily help you configure your monitor to be able to process the login information.
Related Links
Updated on: 10/11/2022
Thank you!