New methods, a fix, and some refactoring
- Add methods:
get_property()
andget_text_content()
. - Only
bring_active_window_to_front()
if not in a frame.
-- This fixes #1170 - Update double_width_emojis list to improve "rich" printing.
- Code optimization and refactoring.
- Refresh Python dependencies:
--rich==11.0.0;python_version>="3.6"
self.get_property(selector, property)
"""Returns the property value of an element.
This is not the same as self.get_property_value(), which returns
the value of an element's computed style using a different algorithm.
If no result is found, an empty string (instead of None) is returned.
Example:
html_text = self.get_property(SELECTOR, "textContent")
"""
self.get_text_content(selector)
"""Returns the text that appears in the HTML for an element.
This is different from "self.get_text(selector, by=By.CSS_SELECTOR)"
because that only returns the visible text on a page for an element,
rather than the HTML text that's being returned from this method."""