MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / internalize_links

Method internalize_links

seleniumbase/undetected/cdp_driver/tab.py:1142–1145  ·  view source on GitHub ↗

All `target="_blank"` links become `target="_self"`. This prevents those links from opening in a new tab.

(self)

Source from the content-addressed store, hash-verified

1140 await self.evaluate(js_code)
1141
1142 async def internalize_links(self):
1143 """All `target="_blank"` links become `target="_self"`.
1144 This prevents those links from opening in a new tab."""
1145 await self.set_attributes('[target="_blank"]', "target", "_self")
1146
1147 async def download_file(
1148 self, url: str, filename: Optional[PathLike] = None

Callers

nothing calls this directly

Calls 1

set_attributesMethod · 0.95

Tested by

no test coverage detected