IDE & Navigation
Properties & Tools
Many web sites and web applications require some kind of access control to certain web pages. One way to do this is to use HTTP Basic Authentication. There are others options but HTTP Basic Authentication is the most popular and easiest to configure and manage.
The use of such user authentication poses challenges to web app testing as the popup login window (example: http://testoptimal.com/img/httpBasicAuth.png) can not be recognized by either Selenium or Htmlunit. TestOptimal addresses this problem with an mScript method $webAuth(…). The details and usage of this method is described below.
$webAuth(authType, userID, password, waitMillis, gotoURL)
Example: $webAuth('HttpBasicAuth', 'myId', 'myPwd','500','http://myapp.abc.com')
All you have to do is to set your appURL for the model to any page protected by HTTP Basic Authentication and then place the above mScript method call in MBT_start trigger. That's it.
Execute your model and you should see the HTTP Basic Authentication login window pop up, the system automatically enters the user id and password you supplied in $webAuth(…) method and navigates to gotoURL_p and your model execution continues.