Page 1 of 1

Do you sync on the file or on some element or what?

PostPosted: Fri Aug 28, 2009 4:06 pm
by index9
How do you arrange for eValid to wait until a particular
JavaScript library is fully loaded before continuing?
Do you sync on the file or on some element or what?

Re: Do you sync on the file or on some element or what?

PostPosted: Fri Aug 28, 2009 5:47 pm
by eValid
index9 wrote:How do you arrange for eValid to wait until a particular
JavaScript library is fully loaded before continuing?
Do you sync on the file or on some element or what?


What you are asking seems to be: How do you make sure that a particular JavaScript file is fully loaded in an AJAX application?

Probably you need to do this sync step because the AJAX application takes a long and variable time to complete this download. This is not unusual at all; we have seen some JavaScript files of upwards of 1.5 MBytes, and these take several tens of seconds to arrive, and maybe even several minutes depending on server load.

The faility in eValid to synchronize this is to add a SynOnDocumentProperty command to the script, where the parameters of the command refer to a DOM property that is exists only AFTER the JavaScript file has finished. You can find such an element by looking at the "Script" attribute in the pure HTML and then looking for the name in the DOM using the PageMap.

Also, you may want to use the simpler sync that just waits for a specific attribute name to show up.

The details on this vary with the application, but we have used this very successfully in a number of different functional test development projects.

The eValid Team