Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Object Mapping with generated Ids
Object Mapping with generated Ids [message #734065] Thu, 06 October 2011 10:56 Go to next message
toralfb  is currently offline toralfb
Messages: 5
Registered: October 2011
Junior Member
Hello,
I've got the following problem:
I want to test a Web-application and thsi application uses in some cases generated ids. So if I map the objects it works all fine but after reloading/restarting the objects get new ids and while a test run i get a "Component not found error".
Is there a possibility to get the objects DOM-based or is can I use a bit of Javascript to get the objects?
Hope you understand my problem.

Re: Object Mapping with generated Ids [message #734881 is a reply to message #734065] Mon, 10 October 2011 05:33 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra Schladebeck
Messages: 1092
Registered: July 2009
Senior Member
Hi,

Have a look at the section in the documentation on testing web apps - you can specify an attribute tag to be used during the test:
http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/manual/node296.html

Best regards,
Alex
Re: Object Mapping with generated Ids [message #736074 is a reply to message #734881] Thu, 13 October 2011 09:58 Go to previous messageGo to next message
toralfb  is currently offline toralfb
Messages: 5
Registered: October 2011
Junior Member
First thank you for your reply for some problems it helped.
Another question according to it. I have a nav bar with different entries, each in it's own div. It seems that the Objectmapper detects them corractly but if I run the test the first entry is taken all the time. the object-mapper determines the hierarchy correct So for the first entry parent-container 1, for the second 2 etc.
I posted the beginning of the Nav-Container. The same problem I get with the sub_menu, that opens after hovering or clicking the Admin-Entry.
Do you have an idea how I can get this elements?
<nav id="navigation" class="sort-pages modify-pages">
  <h1>
  <div id="" class="">
  <div class="drop-menu-item"   onmouseout="it4l_subMenuControl.hideSubMenu('subMenu_15905');" onmouseover="subMenuControl.showSubMenu('subMenu_15905',false);" onclick="subMenuControl.showSubMenu('subMenu_15905',true);">
<div class=""> Admin </div>
<ul id="subMenu_15905" class="pages_list" style="display: none;">
<li class="">
<a href="/group/15905/verwaltung">&gt; Benutzerverwaltung</a>
</li>
<br>
</ul>
</div>
...
</nav>

[Updated on: Thu, 13 October 2011 10:02]

Report message to a moderator

Re: Object Mapping with generated Ids [message #753665 is a reply to message #736074] Fri, 28 October 2011 05:13 Go to previous message
toralfb  is currently offline toralfb
Messages: 5
Registered: October 2011
Junior Member
Another example:
This is the Button I want to get:
<input id="erfassung_schritt1:weiter" type="submit" onclick="var fs_link = getEl('auftrag_fs_link');if(fs_link.className != 'expanded_title'){toggleFieldSet(fs_link)};return validateClientSide();clear_erfassung_5Fschritt1();" value="Weiter" name="erfassung_schritt1:weiter">


If i try ObjectMapping with ID I have the problem, that after reloading he does'nt find the component because some Components in the hierarchy do have generated IDs. If I use type as attribute name for ObjectMapping, Jubula is not able to differentiate this Button from the "Abbrechen"-Button next to it - the same with class.
A picture of the Component after ObjectMapping you can find as an attachement:
Maybe someone has an idea how I can handle the problem?
Previous Topic:Preparing for the Jubula Tutorial at Eclipse Con Europe
Next Topic:Jubula Standalone for Windows 64 Bit?
Goto Forum:
  


Current Time: Tue Jul 22 09:41:50 EDT 2014

Powered by FUDForum. Page generated in 0.02830 seconds