(self, selector, attribute, value=None)
| 1891 | self.loop.run_until_complete(self.page.evaluate(js_code)) |
| 1892 | |
| 1893 | def is_attribute_present(self, selector, attribute, value=None): |
| 1894 | try: |
| 1895 | element = self.find_element(selector, timeout=0.1) |
| 1896 | found_value = element.get_attribute(attribute) |
| 1897 | if found_value is None: |
| 1898 | return False |
| 1899 | if value is not None: |
| 1900 | if found_value == value: |
| 1901 | return True |
| 1902 | else: |
| 1903 | return False |
| 1904 | else: |
| 1905 | return True |
| 1906 | except Exception: |
| 1907 | return False |
| 1908 | |
| 1909 | def is_online(self): |
| 1910 | js_code = "navigator.onLine;" |
nothing calls this directly
no test coverage detected