| Cogitek RIATest 3 Documentation | Copyright © Cogitek Inc. |
Since RIATest is a Flex-only automation solution it is not capable of directly automating HTML pages. If your Flex application is accessible behind an HTML login page then you will need somehow to tell RIATest to perform operations that are necessary to log the user in before your Flex application is loaded in the browser and can be directly automated by RIATest.
The typical way to organize applications which have separate HTML login pages is as follows:
Since RIATest is not capable of submitting the login form on a pure HTML page you need to bypass this login page but still ensure that the necessary server-side login operations are performed so that your Flex application will operate normally. This can usually be achieved by skipping the login page and loading your server-side login script URL directly in the browser.
Assuming that your login form uses "username" and "password" fields to pass credentials to login script you should be able to initiate the login by directly opening the following URL in your browser: http://myserver.mydomain.com/myapp/dologin.php?username=myname&password=mypass (substitute myname and mypass by valid credentials). Opening this URL in your browser will send login credentials to your server side script, which after performing the validation will redirect to your Flex application which will then be loaded in the browser.
After the application is loaded in the browser, the Agent will initialize and connect to RIATest. Once the Agent is connected to RIATest you will be able to automate your Flex application normally. (Please initially try to open this URL manually in your browser to ensure it works as expected - logs you in and opens your Flex application. If it worked then you can make RIATest do the same automatically.)
To utilize this technique you need to
You are now to ready to have RIATest automatically open the browser, initiate login script, wait for your Flex application to load and start automating it.
If your application login scheme is not working exactly as above, your developers should be able to implement a special login server-side script that will perform login operations and redirect tothe main Flex application as described in the above scheme. You can then use this special server-side script just for test automation purposes.