Skip to content

New methods, a fix, and some refactoring #1171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 12, 2022

Conversation

mdmintz
Copy link
Member

@mdmintz mdmintz commented Jan 12, 2022

New methods, a fix, and some refactoring

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."""

@mdmintz mdmintz merged commit 7fda761 into master Jan 12, 2022
@mdmintz mdmintz deleted the new-methods-a-fix-and-refactoring branch January 12, 2022 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bring_active_window_to_front() has a side-effect of switching out of active iframes
1 participant