/usr/share/pyshared/schooltool/testing/README.selenium.txt is in python-schooltool 1:2.1.0-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | ===================================
SchoolTool Selenium Testing Support
===================================
Browser extensions
==================
We can access Selenium browser extensions using the 'ui' attribute of
the browser object, like this:
>>> browser.ui.EXTENSION_GOES_HERE
Most of the extensions are coded in the stesting.py modules in their
corresponding packages. Look for their functional tests in the
selenium_extensions.txt stest files.
We have browser extensions for:
Logging in
----------
* browser.ui.login()
Required parameters:
username
password
Adding persons
--------------
* browser.ui.person.add()
Required parameters:
first_name
last_name
username
password
Optional keyword parameters:
prefix
middle_name
suffix
preferred_name
gender: text of the option to select
birth_date: YYYY-MM-DD date
ID
ethnicity: text of the option to select
language
placeofbirth
citizenship
group: text of the option to select
advisor: text of the option to select
NOTE: if ends is not set, the section will end in the starting term
Adding school years
------------------
* browser.ui.schoolyear.add()
Required parameters:
title
first: YYYY-MM-DD date
last: YYYY-MM-DD date
Optional keyword parameters:
copy_groups: list of non built-in group identifiers from previous year
copy_members: list of non built-in group identifiers from previous year
copy_courses: bool
copy_timetables: bool
Adding terms
------------
* browser.ui.term.add()
Required parameters:
schoolyear: title of the school year
title
first: YYYY-MM-DD date
last: YYYY-MM-DD date
Adding courses
--------------
* browser.ui.course.add()
Required parameters:
schoolyear: title of the school year
title
Optional keyword parameters:
description
course_id
government_id
credits
Adding sections
---------------
* browser.ui.section.add()
Required parameters:
schoolyear: title of the school year
term: title of the term
course: title of the course
Optional keyword parameters:
title
description
ends: title of the term when it ends
NOTE: if ends is not set, the section will end in the starting term
Visiting a section
------------------
* browser.ui.section.go()
Required parameters:
schoolyear: title of the school year
term: title of the term
section: title of the section
Adding instructors to a section
-------------------------------
* browser.ui.section.instructors.add()
Required parameters:
schoolyear: title of the school year
term: title of the term
section: title of the section
instructors: list with person usernames
NOTE: it doesn't matter if some of the usernames are already
instructors of the section
Adding students to a section
----------------------------
* browser.ui.section.students.add()
Required parameters:
schoolyear: title of the school year
term: title of the term
section: title of the section
students: list with person usernames
NOTE: it doesn't matter if some of the usernames are already
students of the section
Adding groups
-------------
* browser.ui.group.add()
Required parameters:
schoolyear: title of the school year
title
Optional keyword parameters:
description
Visiting a group
----------------
* browser.ui.group.go()
Required parameters:
schoolyear: title of the school year
group: title of the group
Adding members to a group
-------------------------
* browser.ui.group.members.add()
Required parameters:
schoolyear: title of the school year
group: title of the group
members: list with person usernames
NOTE: it doesn't matter if some of the usernames are already
members of the group
Element extensions
==================
We can access Selenium element extensions using the 'ui' attribute of
the element object, like this:
>>> element = browser.QUERY_THE_ELEMENT_SOMEHOW
>>> element.ui.EXTENSION_GOES_HERE
The element extensions are coded in the stesting.py module of the
skin.flourish package.
We have element extensions for:
Entering dates
--------------
* element.ui.enter_date()
Required parameters:
date: YYYY-MM-DD date
Selecting an option in a menu
-----------------------------
* element.ui.select_option()
Required parameters:
option: text of the option to select
Setting the value of a field without caring about its type
----------------------------------------------------------
* element.ui.set_value
Required parameters:
value: text that can represent a regular text input, the content
of a textarea (it's possible to set break lines using \n), a
YYYY-MM-DD used in the datepicker widget or the text of an option
in a menu
|