(self, options_selector, values)
| 209 | ) |
| 210 | |
| 211 | def _assertOptionsValues(self, options_selector, values): |
| 212 | from selenium.webdriver.common.by import By |
| 213 | |
| 214 | if values: |
| 215 | options = self.selenium.find_elements(By.CSS_SELECTOR, options_selector) |
| 216 | actual_values = [] |
| 217 | for option in options: |
| 218 | actual_values.append(option.get_attribute("value")) |
| 219 | self.assertEqual(values, actual_values) |
| 220 | else: |
| 221 | # Prevent the `find_elements(By.CSS_SELECTOR, …)` call from |
| 222 | # blocking if the selector doesn't match any options as we expect |
| 223 | # it to be the case. |
| 224 | with self.disable_implicit_wait(): |
| 225 | self.wait_until( |
| 226 | lambda driver: not driver.find_elements( |
| 227 | By.CSS_SELECTOR, options_selector |
| 228 | ) |
| 229 | ) |
| 230 | |
| 231 | def assertSelectOptions(self, selector, values): |
| 232 | """ |
no test coverage detected