From 64917ca1fcf8d43cb6e33e46d865aa20d462da69 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Wed, 30 Mar 2011 11:29:09 +0000
Subject: [PATCH] Do not use the label as it could easily changed and is
 language-dependent

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44791 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 erp5/util/test_browser/examples/testAddPerson.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/erp5/util/test_browser/examples/testAddPerson.py b/erp5/util/test_browser/examples/testAddPerson.py
index efdee00f37..3037d720be 100755
--- a/erp5/util/test_browser/examples/testAddPerson.py
+++ b/erp5/util/test_browser/examples/testAddPerson.py
@@ -7,7 +7,7 @@ ITERATION = 20
 
 def benchmarkAddPerson(result_dict):
   """
-  Benchmark adding a person
+  Benchmark adding a person.
   """
   # Create a browser instance
   browser = Browser('http://localhost:18080/', 'erp5',
@@ -17,10 +17,10 @@ def benchmarkAddPerson(result_dict):
   browser.open()
 
   # Go to Persons module (person_module)
-  browser.mainForm.submitSelectModule(label='Persons')
+  browser.mainForm.submitSelectModule(value='/person_module')
 
   # Create a new person and record the time elapsed in seconds
-  result_dict.setdefault('Create new person', []).append(
+  result_dict.setdefault('Create', []).append(
     browser.mainForm.timeSubmitNewInSecond())
 
   # Check whether it has been successfully created
@@ -38,7 +38,7 @@ def benchmarkAddPerson(result_dict):
   assert browser.getTransitionMessage() == 'Data updated.'
 
   # Validate the person and record confirmation
-  browser.mainForm.submitSelectWorkflow(label='Validate')
+  browser.mainForm.submitSelectWorkflow(value='validate_action')
   result_dict.setdefault('Validate', []).append(
     browser.mainForm.timeSubmitDialogConfirmInSecond())
 
@@ -55,4 +55,4 @@ if __name__ == '__main__':
     counter += 1
 
   for title, time_list in result_dict.iteritems():
-    print "Average: %s: %.4fs" % (title, float(sum(time_list)) / ITERATION)
+    print "%s: %.4fs" % (title, float(sum(time_list)) / ITERATION)
-- 
2.30.9