root/trunk/calendar3/webtest/webpublic/clientMacros.xml

Revision 254 (checked in by douglm, 7 years ago)

Add webtest

Line 
1 <?xml version="1.0"?>
2 <!DOCTYPE project SYSTEM "../WebTest.dtd">
3
4 <project name="clientMacros" basedir="." default="init">
5   <!-- Login to the user client
6     -->
7   <macrodef name="userLogin">
8       <attribute name="id" default="douglm"/>
9       <attribute name="pw" default="bedework"/>
10       <attribute name="url" default="/ucal/setup.do"/>
11     <sequential>
12       <invoke description="get Login Page" url="@{url}" />
13
14       <setInputField description="set user name"
15                      name="j_username"
16                      value="@{id}" />
17       <setInputField description="set password"
18                      name="j_password"
19                      value="@{pw}" />
20       <clickButton description="Click the submit button"
21                    name="j_security_check" />
22     </sequential>
23   </macrodef>
24
25   <macrodef name="publicSetup">
26       <attribute name="url" default="/cal/setup.do"/>
27     <sequential>
28       <invoke description="setup url" url="@{url}" />
29     </sequential>
30   </macrodef>
31
32   <!-- Verify we are on the main page and store some urls
33     -->
34   <macrodef name="verifyMainPage">
35     <sequential>
36       <!-- Store the links we want to use as mainurlXXX" -->
37       <storeElementAttribute description="Extract href of prev view period url"
38                              htmlId="prevViewPeriod"
39                              attributeName="href"
40                              propertyName="mainurlPrevViewperiod" />
41       <storeElementAttribute description="Extract href of next view period url"
42                              htmlId="nextViewPeriod"
43                              attributeName="href"
44                              propertyName="mainurlNextViewperiod" />
45     </sequential>
46   </macrodef>
47 </project>
48
Note: See TracBrowser for help on using the browser.