PMC:QA:Selenium with ZK Webui POC

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.

Selenium with hudson and ADwebui

Recorded test script

Record Sahi script via Selenium ide(Selenium ide 1.0.5).

how to do please refer to PMC:QA:selenium


problem 1

Here has a problem:"Your browser doesnt support Xml Http Request"


It's a Selenium's bug.Check it out here:

The fix should be implemented in version 1.0.6.

Meanwhile, you can fix it by yourself. Here is how I did it:

  • search for "selenium-ide-common.xul" file

for windows:in "C:\Documents and Settings\<your username>\" folder

for linux:in /home/<your username>/.mozilla/firefox/xokico1w.default/extensions/{a6fd85ed-e919-4a43-a5af-8da18bda539f}/chrome/content

  • edit it and add the following code in e.g. line 64:
<script type="application/x-javascript"
  • restart Firefox.


problem 2

we can take a look of the generated HTML by using Firefox with Firebug.

Adempiere webui based on ZK.,we can find that the element's id is different in every time testing.(eg.First time i get z_ve_5, but second time i get z_0f_5).

the textbox:UserId


the generated html by using Firefox with Firebug.

  • first time


  • second time


it is more convenient if we know the ID of it. (If your case is complicated, you will get a long, hard to find XPath) So we can use the id generator function of ZK to generate predictable id of HTML element. Thus, we can get it by using Selenium.method("the name").

How to test ZK Application with Selenium please refer to:

But now Adempiere webui haven't integrate with IdGenerator.


  • In this SF thread there is debate that the IDGenerator is resolved [1]. - Redhuan D. Oon 04:08, 18 October 2011 (UTC)