diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml
index 5e4d5c3bbf6e41bc236a1cf3bccb462ea5d13c67..4b2d1f5fd70ca536ec984b607f95367943b3d54b 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testPager.xml
@@ -157,18 +157,13 @@
   <td>id=listbox_item_number</td>\n
   <td> - 0 item(s) selected</td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -205,18 +200,13 @@
   <td>id=listbox_next_page</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -253,18 +243,13 @@
   <td>id=listbox_previous_page</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -307,11 +292,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr> \n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>4</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -319,11 +299,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>4 of 4</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>9</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:4;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tr>\n
@@ -367,18 +348,13 @@
   <td>id=listbox_item_number</td>\n
   <td> - 0 item(s) selected</td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>6</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementNotPresent</td>\n
   <td>id=listbox_next_page</td>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml
index b754d8550c04c9cb53e820dab7acb23689d862a6..a4a2c0b040d6cf33e1eea9f10d5e0d55ec374fbf 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testRedirect.xml
@@ -51,7 +51,7 @@
 <tr><td rowspan="1" colspan="3">Test ListBox Redirections</td></tr>\n
 </thead><tbody>\n
 <!-- XXX Report tree mode doesn\'t exists in mobile\n
-     So this test is skipped -->\n
+     So this test is skipped in mobile ui tests-->\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 \n
 <!--\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml
index 410848bb64f9596767a797c9c7396bb16ffa5a70..968844cb0ada093cbe065be3bf797ce2d2dcfc1c 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/listbox_zuite/testViewMode.xml
@@ -108,18 +108,19 @@
   <td>id=listbox_item_number</td>\n
   <td> - 0 item(s) selected</td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+<!-- \n
+  To check page number use ListBoxZuite_CommonTemplate/macros/checkCurrentPage to reduce \n
+  "if TestTool_getSkinName()!=\'Mobile\'" statements\n
+  - prefix is gives the prefix of the id of the element containing the page number\n
+  - set_page the number of the page\n
+  - lines_per_page is used in mobile because there isn\'t "listbox_set_page" element\n
+-->\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -233,18 +234,12 @@
   <td></td>\n
 </tr>\n
 \n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-</tr>\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
@@ -364,18 +359,13 @@
   <td>Base_edit:method</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:3">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>verifyElementPresent</td>\n
   <td>id=listbox_next_page</td>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml
index c2828d769370f6feca878e5286dfbf6487036668..439027daedca6589a63a808b94ecaab9fc352b68 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testMultiRelationFieldSearchDialogChangePage.xml
@@ -118,18 +118,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -141,18 +136,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -164,18 +154,12 @@
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
@@ -197,18 +181,12 @@
 </tr>\n
 </tal:block>\n
 \n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-  </tal:block>\n
-</tr>\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -226,11 +204,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>3</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -238,11 +211,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>3 of 3</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml
index 9fc8837a38bb6a4ccc4d7cbb2fd8f867b5c0b520..0e5ee2dc3cb599a1a91c83ce5a79689cdc4a1c21 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testRelationFieldWheelWithListbox.xml
@@ -114,54 +114,36 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
@@ -174,11 +156,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>verifyValue</td>\n
-  <td>id=listbox_set_page</td>\n
-  <td>1</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -186,13 +163,13 @@
   <td>id=listbox_page_selection</td>\n
   <td>1 of 19</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-</tr>\n
 </tal:block>\n
 \n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>click</td>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml
index bb39427bd98055eed7efc59e8cc52c31e901eb64..016200f42b9318cc7365915f8b0cd1f1a74e0927 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldPageChange.xml
@@ -97,54 +97,36 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tr>\n
   <td>clickAndWait</td>\n
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
@@ -157,11 +139,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>1</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -169,11 +146,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>1 of 135</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>0</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:1;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
@@ -187,11 +165,6 @@
   <td>id=listbox_set_page</td>\n
   <td>\\13</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-</tr>\n
 </tal:block>\n
 <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
 <tr>\n
@@ -199,11 +172,12 @@
   <td>id=listbox_page_selection</td>\n
   <td>3 of 135</td>\n
 </tr>\n
-<tr>\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-</tr>\n
+</tal:block>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
 </tal:block>\n
 \n
 <tr>\n
diff --git a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml
index f6907e5c8dd125d701c8dd3b4b86fccf5e760898..9004ba617bf8b535d54fe7da8ed6f9a0ece5e3d8 100644
--- a/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml
+++ b/bt5/erp5_ui_test/PathTemplateItem/portal_tests/relation_field_zuite/testSimpleRelationFieldSearchDialogChangePage.xml
@@ -107,18 +107,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -130,18 +125,13 @@
   <td>//input[@id="listbox_next_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>3</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>20</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:3;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
+\n
 <tr>\n
   <td>assertValue</td>\n
   <td>title</td>\n
@@ -153,18 +143,12 @@
   <td>//input[@id="listbox_previous_page"]</td>\n
   <td></td>\n
 </tr>\n
-<tr>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>//input[@id="listbox_set_page"]</td>\n
-  <td>2</td>\n
-  </tal:block>\n
-  <tal:block tal:condition="python: context.TestTool_getSkinName()==\'Mobile\'">\n
-  <td>assertValue</td>\n
-  <td>id=listbox_page_selection</td>\n
-  <td>10</td>\n
-  </tal:block>\n
-</tr>\n
+\n
+<tal:block tal:define="prefix string:listbox; \n
+                       set_page python:2;\n
+                       lines_per_pages python:10">\n
+  <tal:block metal:use-macro="here/ListBoxZuite_CommonTemplate/macros/checkCurrentPage" />\n
+</tal:block>\n
 \n
 <tal:block tal:condition="python: context.TestTool_getSkinName()!=\'Mobile\'">\n
 <tr>\n
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 560731b56bf1c51dd98fee4303136e403d943dab..4f09af7132f46046b51bb310c9bf52ad24360558 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-490
\ No newline at end of file
+492
\ No newline at end of file