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

Method is_visible

miniwob++/html_tools/html_parser.py:172–189  ·  view source on GitHub ↗
(bid: str)

Source from the content-addressed store, hash-verified

170 return True
171
172 def is_visible(bid: str) -> bool:
173 if not self.use_position:
174 return True
175
176 rect = self.rect.get(bid, None)
177 if rect is None:
178 return False
179
180 if self.window_size is None:
181 return True
182
183 # get window size
184 wx, wy, ww, wh = self.window_size
185 x, y, w, h = rect
186 if x + w < wx or x > wx + ww or y + h < wy or y > wy + wh:
187 return False
188
189 return True
190
191 def _dfs(node: html.HtmlElement, keep: list[str]=[], obs: list[str]=[],
192 parent_chain: bool=False, get_new_label: bool=False, par_keep: bool=False) -> (str, dict[str]):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected