Display results as :

Rechercher Advanced Search

Latest topics

Hello . needing a help with php tests on aplication that uses javascripts

View previous topic View next topic Go down

Hello . needing a help with php tests on aplication that uses javascripts

Post by gvHidraTester on Thu Jul 15, 2010 8:16 pm

Hi ..
firstly , sorry if my english languje is not so good :p ,

the problem is that i used selenium ide to generate a simple test for my
php application .
the problem was with the click(locator) function ..

using the function with a simple element of my page it works , for
example :
this call works good because it finds the element "gvhidra/" in this page:
<title>Index of /demo</title>
<h1>Index of /demo</h1>
<ul><li><a href="/"> Parent Directory</a></li>
<li><a href="gvhidra/"> gvhidra/</a></li>

<li><a href="pruebas-igep/"> pruebas-igep/</a></li>

but my problem is with a menu elements that they can be expanded (calling a javascript function defined in my application)
for example :
<div id="M01838cd63f672f5c2aa5a3053ebbfe63" style="display: block;"><img src="igep/images/menu/43.gif" alt="+" title="Patrones Simples"><b><a class="formularios menu_modulos" href='javascript:mostrarOpciones("MM43fd36364fafbc63d31e9237286e5fe1")'>Patrones Simples</a></b> ...... rest of the div block

the call
$this->click("link=Patrones Simples"); fails always returning :

1) Example::testMyTestCase
PHPUnit_Framework_Exception: Response from Selenium RC server for testComplete().
ERROR: Element link=Patrones Simples not found.

i readed a lot of manuals , explaining how to add commands or actions by regenerating the selenium jar or by adding the function into the user-extensions file :

but without results .. the server doesent recognize my methods ..
i tryed with $this->click(dom=the java script mostrarOpciones function definition and its call) , but didnt works and gives an error :
ERROR: Element dom=<the definition and the call of my function> not found.

anybody knows how to integrates the javascripts calls with selenium and how to localizate well any element of my page ?
note: i tried the $this->click(id="MM43fd36364fafbc63d31e9237286e5fe1") , but it didnt work Sad ..

any help would be good ..
waiting and , thank u very much ..


Posts : 1
Join date : 2010-07-15

Back to top Go down

Hi pal

Post by admod on Wed Sep 29, 2010 2:10 pm

Hi Friend,

I saw your query regarding selenium RC link . Do you please give your working code to test in my local system.
I think if you can give same , I can work on it and find a solution. If you already got it it solution , then also
please send it . I plan to write a tutorial regards same, I think if you send same it's a good exposure
to me and all . So Please send it in my id : anes(dot)pa@gmail(dot)com...

Anes P.A


Posts : 4
Join date : 2010-09-29

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum