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

Method check_attr

webarena/browser_env/html_tools/html_parser.py:167–175  ·  view source on GitHub ↗
(attr: str, node: html.HtmlElement)

Source from the content-addressed store, hash-verified

165 return '' if str is None else str.strip()[:500]
166
167 def check_attr(attr: str, node: html.HtmlElement) -> bool:
168 tag = node.tag
169 if (
170 ( attr == 'role' and node.attrib.get(attr, '') in ['presentation', 'none', 'link'] )
171 or ( attr == 'type' and node.attrib.get(attr, '') == 'hidden' )
172 # or ( attr == 'value' and tag in ['option'] )
173 ):
174 return False
175 return True
176
177 def is_visible(node: html.HtmlElement, bid: str) -> bool:
178 if self.dataset == 'mind2web':

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected