** Warning ** This call will eventually be depricated. ** It is suggested that you modify your code to use the recommended window[key] lookup or the PEP8 compliant window.find_element(key) For now, you'll only see a message printed and the call will continue to funcation a
(self, key, silent_on_error=False)
| 10923 | return matches[0] if len(matches) else None |
| 10924 | |
| 10925 | def FindElement(self, key, silent_on_error=False): |
| 10926 | """ |
| 10927 | ** Warning ** This call will eventually be depricated. ** |
| 10928 | |
| 10929 | It is suggested that you modify your code to use the recommended window[key] lookup or the PEP8 compliant window.find_element(key) |
| 10930 | |
| 10931 | For now, you'll only see a message printed and the call will continue to funcation as before. |
| 10932 | |
| 10933 | :param key: Used with window.find_element and with return values to uniquely identify this element |
| 10934 | :type key: str | int | tuple | object |
| 10935 | :param silent_on_error: If True do not display popup nor print warning of key errors |
| 10936 | :type silent_on_error: (bool) |
| 10937 | :return: Return value can be: the Element that matches the supplied key if found; an Error Element if silent_on_error is False; None if silent_on_error True; |
| 10938 | :rtype: Element | Error Element | None |
| 10939 | """ |
| 10940 | |
| 10941 | warnings.warn('Use of FindElement is not recommended.\nEither switch to the recommended window[key] format\nor the PEP8 compliant find_element', |
| 10942 | UserWarning) |
| 10943 | print('** Warning - FindElement should not be used to look up elements. window[key] or window.find_element are recommended. **') |
| 10944 | |
| 10945 | return self.find_element(key, silent_on_error=silent_on_error) |
| 10946 | |
| 10947 | def find_element(self, key, silent_on_error=False, supress_guessing=None, supress_raise=None): |
| 10948 | """ |
nothing calls this directly
no test coverage detected