Вот пример кода, который показывает, как я проверяю списки. xpath_to_elements_of_drop_down_list
и должен быть заменен соответствующим xpath.
execute script | return ['Regular', 'Premium', 'Annual', 'Monthly'] | tabArr
store | 4 | nTabArr
store | 0 | j
store xpath count | xpath=xpath_to_elements_of_drop_down_list | n
assert | ${n} == ${N} | true
echo | Number of elements in the drop down list is correct |
while | ${j} < ${nTabArr} |
execute script | return ${tabArr}[${j}] | tabName
assert element present | xpath=path_to_elements_of_drop_down_list[contains(.,'${tabName}')] |
echo | ${tabName} is present in the drop down list|
execute script | return Number(${j}) + 1 | j
end | |