MCPcopy Create free account
hub / github.com/THUDM/AutoWebGLM / check_attr

Method check_attr

miniwob++/html_tools/html_parser.py:162–170  ·  view source on GitHub ↗
(attr: str, node: html.HtmlElement)

Source from the content-addressed store, hash-verified

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:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected