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

Method assert_title_contains

seleniumbase/core/sb_cdp.py:3291–3302  ·  view source on GitHub ↗
(self, substring)

Source from the content-addressed store, hash-verified

3289 raise Exception(error % (expected, actual))
3290
3291 def assert_title_contains(self, substring):
3292 expected = substring.strip()
3293 actual = self.get_title().strip()
3294 error = (
3295 "Expected title substring [%s] does not appear "
3296 "in the actual page title [%s]!"
3297 )
3298 if expected not in actual:
3299 time.sleep(2)
3300 actual = self.get_title().strip()
3301 if expected not in actual:
3302 raise Exception(error % (expected, actual))
3303
3304 def assert_url(self, url):
3305 expected = url.strip()

Calls 2

get_titleMethod · 0.95
sleepMethod · 0.45