Page 1 of 1

Right page with right text?

PostPosted: Wed Apr 15, 2009 10:15 pm
by greichert
Hi,

When playing a scenario, how can we make sure the right page is being loaded with the right text displayed in the page.

We need to check the URL to make sure that, if there is a redirection (to a login page for instance), we reach the right page. So even if the scenario clicks on a link to http://www.mysite.com/mypage.asp, I need to confirm the scenario is reaching http://www.mysite.com/login.asp.

We tried with SyncOnURL but, it the correct URL is not loading (if the redirection to the login page did not happen for some reason), SyncOnURL waits until it timeouts. We need a solution that exists the scenario immediately with an ERROR code if the URL reached is not the right one.

For the text, same thing with SyncOnText. If the page does not contain the expected text, we need the scenario to abort immediately, not wait till it gives a timeout.

Thanks!

Re: Right page with right text?

PostPosted: Tue Apr 21, 2009 11:39 am
by synchronization
(1) The best way to confirm that the right page has arrived is to
have the validation done on some part of the page.

For example, an item of selected text or some DOM property.

Here is the complete description of eValid's Validation modes:

http://www.e-Valid.com/Products/Documentation.9/Testing/validation.html

Validating on a text passage also can be used to synchronize
playback, and this is particularly important in an AJAX application.

Here is a detailed explanation of how DOM-based synchronization
works in eVlaid playbacks:

http://www.e-Valid.com/Products/Documentation.9/DOM/adaptive.sync.html

(2) They SyncOnURL works by waiting for the specific URL to arrive
and be available in the DOM.

But as you have found out, if there are redirections involved then
the SyncOnURL command will probably time out rather than ever
complete the synchronizations.

(3) To throw an ERROR is automatic -- if the sync did not happen as
expected, within the time limit.

Or you can do your OWN checking in the script using the
OvertimeAlarm command.

Here is a worked example showing how to use the built-in eValid
Timer and the OvertimeAlarm commands:

http://www.e-valid.com/Products/Documentation.9/Monitoring/alarmex.html