commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James CE Johnson <>
Subject Re: Latka Questions
Date Fri, 22 Mar 2002 13:09:56 GMT wrote:

> James CE Johnson <> wrote on 22/03/2002 03:07:58 AM:
> > Hi,,
> >
> > I've been looking at latka as a testing framework for our application
> > and have some specific questions that I can't find the answers to. 
> Would
> > this be the best place to ask?
> That and the best place to help us with the documentation so that it 
> keeps getting better. 

Great! I didn't want to spam the dev list with what will probably turn 
out to be usage questions.

I initially have two questions that will most likely lead into others.

Question 1 -- Selecting a form

Our app frequently has multiple forms per page. Depending on what the 
user chooses to do, one or the other will be submitted. How can I tell 
latka which form should receive the parameters defined in its input file?

For instance:

<li><a href="javascript:editUser('james');">James</a>

<a href="javascript:neverMind();"><img src="forgetIt.gif" border="0"></a>

<form name="editUserForm" action="">
<input type="hidden" name="userName"/>

<form name="neverMindForm" action="">
<input type="hidden" processName="editUser"/>

<script ...>
function editUser(theUser) {
  document.editUserForm.userName.value = theUser;
function neverMind() {

Question 2 -- Preserving values for "playback"

In reality, the user add process would create users with automatically 
generated unique IDs. So instead of this:
    <li><a href="javascript:editUser('james');">James</a>
we would have this:
    <li><a href="javascript:editUser('1234');">1234</a> James</li>

In order to test the user-add process completely I would define my 
testcase along these lines:

A) Invoke
B) Populate that form with some test user data. Let's say the username 
is "TestUserFoo"
C) Submit the form
D) Invoke
E) Apply an xpath along these lines to locate the user I just added:
(that may not be perfectly correct but you get the idea)
F) Use the getText() value of the 'a' element located to invoke


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message