| Method | Retrieves | Affected by JS? | Returns Hidden Content? |
|---|---|---|---|
getAttribute("name") |
HTML attribute or DOM property | ✅ Yes | ❌ No |
getDomAttribute("name") |
HTML attribute (strict) | ❌ No | ❌ No |
getDomProperty("name") |
DOM property (live JS value) | ✅ Yes | ❌ No |
getText() |
Visible on-screen text | ✅ Yes | ❌ No |
Created
November 19, 2025 23:41
-
-
Save a-oleynik/d29b6af1f2d60531d997f0d3cd288798 to your computer and use it in GitHub Desktop.
WebElement Method Comparison Table.md
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment