(attr: str, node: html.HtmlElement)
| 160 | return '' if str is None else str.strip()[:500] |
| 161 | |
| 162 | def check_attr(attr: str, node: html.HtmlElement) -> bool: |
| 163 | tag = node.tag |
| 164 | if ( |
| 165 | ( attr == 'role' and node.attrib.get(attr, '') in ['presentation', 'none', 'link'] ) |
| 166 | or ( attr == 'type' and node.attrib.get(attr, '') == 'hidden' ) |
| 167 | or ( attr == 'value' and tag in ['option'] ) |
| 168 | ): |
| 169 | return False |
| 170 | return True |
| 171 | |
| 172 | def is_visible(bid: str) -> bool: |
| 173 | if not self.use_position: |
nothing calls this directly
no outgoing calls
no test coverage detected