Problem with Script Playback

Applying eValid to AJAX applications that require advanced DOM-based methods.

Problem with Script Playback

Postby unsigned » Mon May 12, 2008 2:57 pm

Hi,

The application has worked quite well so far but I have run into one
problem. The application seems to be using just coordinates to refer to
a mouse click somewhere in the page. Is it possible to use element id
instead?

E.g. There's a collection feature in our application. When you manage
your collections, the collections that you have are shown a top of the
page and under them is a button for adding new ones. Let's presume that
I have no collections to begin with. I begin recording a script for
adding a new collection. During the recording the "add new" button is
located quite high on the screen because I don't have any collections
which would push the button down. When I've done with the recording and
begin testing the script, I already have collection and that pushes the
"add new" button down a bit so it's not located at the same place than
it was when I was recording the script. So when running the script, the
application clicks the screen at a wrong point on the screen so nothing
happens. I tried this with different methods but always had the same
problem. If I could refer to button id instead of coordinates there
wouldn't be any problems with this.

Of course I can avoid this problem by making sure that the application
is at a certain stage when I begin testing but that creates one
additional step where things can go wrong.
unsigned
 
Posts: 167
Joined: Tue Jan 01, 2008 12:48 pm

Re: Problem with Script Playback

Postby Dom » Mon May 12, 2008 2:59 pm

Yes, insofar as possible you should avoid use of any of the
commands that require the desktop, but sometimes that isn't
possible. So we have that class of commands there because they
are sometimes the only alternative.

On the other hand, perhaps you missed seeing these commands:

http://www.e-Valid.com/Products/Documen ... ation.html

These don't "record from the GUI" but are edited into your
script. We recommend you record first, then systematically
replace to get the right effect. For example:

IndexFindElement 0 DOWN id "required_id_value" ""

positions the "sourceIndex" at the right DOM element. You might
follow that with an:

IndexElementClick 0 "" NAV

to cause a click there followe by an expected NAVigation.

Some experimentation is often required, but once you have the sequence
it is totally independent of the details of the page from there
forward. Also, all of these "motion commands" are desktop safe,
meaning that the script then would not make any reference to any
desktop command.
eValid Tech Support Team
Dom
 
Posts: 16
Joined: Tue Jan 01, 2008 12:48 pm


Return to AJAX Applications & DOM Processing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons