[ptt-users] Beginner question (sorry for the late response)

"Tomás A. Rossi" trossi at mecon.gov.ar
Wed Sep 26 07:41:00 PDT 2007


The app is a framed cgi app. On the left frame, there's a main menu to 
access the various screens.

I tested a search screen that is, basically, a form with several fields 
and a submit button.

The screen URL is: 
http://maquinas-test.mecon.ar/cgi-bin/listado_maquinas.cgi

The HTML is:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" 
xml:lang="en-US"><head><title>Consulta de IPs por bloque</title>
<link rel="stylesheet" type="text/css" href="/styles/maquinas.css" />
<script src="/js/script_code.js" type="text/javascript"></script>
</head><body class="basico"><form method="post" 
action="/cgi-bin/listado_maquinas.cgi" 
enctype="application/x-www-form-urlencoded">
<table class="encabezado"><tr><td>Consulta de 
máquinas</td></tr></table><br /><table 
class="consulta"><tr><td>Etiqueta:</td> <td><input type="text" 
name="etiqueta"  /></td></tr>
<tr><td>Nombre:</td> <td><input type="text" name="nombre_maquina"  /> 
(expresiones regulares)</td></tr>

<tr><td>Bloque (o IP):</td> <td><input type="text" name="bloque"  /> 
(ej.: 192.168.0.0/24 ó 192.168.1.1)</td></tr>
<tr><td>MAC:</td> <td><input type="text" name="mac"  /> (ej.: 
00:11:22:33:44:55)</td></tr>
<tr><td>Switches habilitados:</td> <td><input type="text" name="switch" 
  /> (ej.: 192.168.0.0:2 ó swprueba:8 ó 192.168.1.1 ó 
swprueba.mecon.ar)</td></tr>
<tr><td>Área:</td> <td><input type="text" name="area"  /></td></tr>

<tr><td>Edificio:</td> <td><input type="text" name="edificio"  /></td></tr>
<tr><td>Piso:</td> <td><input type="text" name="piso"  /></td></tr>
<tr><td>Oficina:</td> <td><input type="text" name="oficina"  /></td></tr>
<tr><td>Nro. de serie:</td> <td><input type="text" name="nro_serie" 
/></td></tr>
<tr><td>Nro. de patrimonio:</td> <td><input type="text" 
name="nro_patrimonio"  /></td></tr>
<tr><td>Candado:</td> <td><input type="text" name="candado"  /></td></tr>

<tr><td>Llave:</td> <td><input type="text" name="llave"  /></td></tr>
<tr><td>Master:</td> <td><select name="id_master"><option 
value="">Cualquiera</option><option value="0">Sin master</option><option 
value="1">Master MECON</option><option value="2">Master 
MINPLAN</option></select></td></tr>
<tr><td>Tipo de dispositivo:</td> <td><select 
name="id_dispositivo"><option value="">Cualquiera</option><option 
value="0">estación de trabajo</option><option 
value="1">servidor</option><option value="2">switch</option><option 
value="3">router</option><option value="4">impresora de 
red</option></select></td></tr>

<tr><td>Habilitada:</td> <td><select name="habilitada"><option 
value="0">Indistinto</option><option value="1">No</option><option 
value="2">Sí</option></select></td></tr>
<tr><td>802.1x habilitado:</td> <td><select name="habil_802"><option 
value="0">Indistinto</option><option value="1">No</option><option 
value="2">Sí</option></select></td></tr>
<tr><td>Todos los switches hab.:</td> <td><select 
name="restriccion_switch"><option value="0">Indistinto</option><option 
value="1">No</option><option value="2">Sí</option></select></td></tr>

<tr><td class="boton" colspan="2"><input type="submit" name=".submit" 
/></td></tr>
</table><div></div></form><hr />

The recording:

    1. goto location http://maquinas-test.mecon.ar/menu.html
    2. assert page title MNEU2
    3. enter text INPUT[@TYPE="text" and @NAME="nombre_maquina"] = [jupiter]
    4. click INPUT[@NAME=".submit" and @VALUE=""]
    5. assert page title MNEU2
    6. click A[@CDATA="11291"]
    7. assert page title MNEU2
    8. click INPUT[@NAME="ophabilitar" and @VALUE="Habilitar"]
    9. assert page title MNEU2

The result:

I go to the search screen, press "play" and it browses back to 
menu.html, which I didn't want it to. This blanks off the search form, 
so, the subsequent orders can't be followed. It pops:

error finding object with predicate: -1

So I wipe the step 1, as I don't need the test to browse that URL, and I 
try again:

The same error.

Then, it pops some other errors like:

Could not find object:*/FORM[-1]/*/INPUT[@TYPE="text" and 
@NAME="nombre_maquina"]
Step: 1

Sorry for the late response and
thanks in advance,
--
Tom;

Frank Cohen escribió:
> Hi Tom: Thanks for using TestMaker. The error you are seeing is an XPath 
> expression that operates on the DOM of the received Web page. I might be 
> able to tell you what is going wrong if you would send me the HTML. -Frank
> 
> 
> 
> 
> On Aug 31, 2007, at 11:05 AM, Tomás A. Rossi wrote:
> 
>> I have a very simple Perl (CGI) webapp on some server. It's a framed 
>> HTML interface and it runs on the latest Firefox smoothly. I've 
>> installed the latest PushToTest (version 5.0 for Windows) and tried to 
>> use the Firefox (v2.0.0.6) plugin to record some actions on the 
>> interface, resulting in multiple errors.
>>
>> The errors look like:
>>
>> Could not find object:*/FORM[-1]/*/INPUT[@TYPE="text" and 
>> @NAME="nombre_maquina"]
>> Step: 4
>>
>> I tried on other web apps I have, and it happens to occur the same, 
>> except for some very short action recordings.
>>
>> Oh, and in the tutorial examples, it works great.
>>
>> What could it be?
>>
>> Thanks in advance,
>> -- 
>> Tom;
>> _______________________________________________
>> Users mailing list
>> Users at lists.pushtotest.com
>> http://lists.pushtotest.com/mailman/listinfo/users
>>
> 
> 
> 
> -- 
> Frank Cohen, PushToTest, http://www.PushToTest.com, phone 408 374 7426
> TestMaker: The open-source SOA test automation tool
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/users



More information about the Users mailing list