Fills a window with values provided in a values dictionary { element_key : new_value } :param window: The window object to fill :type window: (Window) :param values_dict: A dictionary with element keys as key and value is values parm for Update call :type values_dict
(window, values_dict)
| 15140 | |
| 15141 | |
| 15142 | def fill_form_with_values(window, values_dict): |
| 15143 | """ |
| 15144 | Fills a window with values provided in a values dictionary { element_key : new_value } |
| 15145 | |
| 15146 | :param window: The window object to fill |
| 15147 | :type window: (Window) |
| 15148 | :param values_dict: A dictionary with element keys as key and value is values parm for Update call |
| 15149 | :type values_dict: (Dict[Any, Any]) |
| 15150 | :return: None |
| 15151 | :rtype: None |
| 15152 | """ |
| 15153 | |
| 15154 | for element_key in values_dict: |
| 15155 | try: |
| 15156 | window.AllKeysDict[element_key].Update(values_dict[element_key]) |
| 15157 | except Exception as e: |
| 15158 | print('Problem filling form. Perhaps bad key? This is a suspected bad key: {}'.format(element_key)) |
| 15159 | |
| 15160 | |
| 15161 | def _FindElementWithFocusInSubForm(form): |