1,072
edits
| Line 45: | Line 45: | ||
Test cases use values from TCparams to drive the test. | Test cases use values from TCparams to drive the test. | ||
*Option lists such as user | *Option lists such as user types, Mozilla applications and sort options are used in nested for-loops. | ||
*Values such as maxItemsPerPage or maxCategories are used to limit how many items on a page or number of categories are included in the test run. | *Values such as maxItemsPerPage or maxCategories are used to limit how many items on a page or number of categories are included in the test run. | ||
| Line 64: | Line 64: | ||
# eventually the destination page is reached | # eventually the destination page is reached | ||
# determine the maximum add-ons to check on this page | # determine the maximum add-ons to check on this page | ||
max_count = min( | max_count = min(selenium.get_xpath_count(addon_item_locator), tc_params.maxItemsPerPage) | ||
for addon_index in range(1, max_count + 1): | for addon_index in range(1, max_count + 1): | ||
# process an add-on | # process an add-on | ||
<br> Because of the multiple nested loops the innermost loop can be deeply indented resulting in less space for statements when the 80 character | <br> Because of the multiple nested loops the innermost loop can be deeply indented resulting in less horizontal space for statements when following the 80 character line limit. | ||
B) '''Option tuples '''<br> | B) '''Option tuples '''<br> | ||
| Line 94: | Line 93: | ||
# eventually the destination page is reached | # eventually the destination page is reached | ||
... | ... | ||
# | # determine the number of add-ons to check on this page | ||
max_count = min(selenium.get_xpath_count(addon_item_locator), tc_params.maxItemsPerPage) | |||
for addon_index in range(1, max_count + 1): | |||
# process an add-on | |||
''shared_lib'' is the shared library where combos_from_lists is defined: general_functions in pre-POM test cases, data_functions in POM. | ''shared_lib'' is the shared library where combos_from_lists is defined: general_functions in pre-POM test cases, data_functions in POM. | ||
edits