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

Method test_click_with_offset

examples/test_canvas.py:36–49  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 self.driver.quit()
35
36 def test_click_with_offset(self):
37 self.goto("https://seleniumbase.io/canvas/")
38 if self.undetectable:
39 self.goto_if_not_url("about:blank")
40 print("\n Skip this test in undetectable mode.")
41 self.skip("Skip this test in undetectable mode.")
42 self.assert_title_contains("Canvas")
43 self.highlight("canvas")
44 rgb = self.get_canvas_pixel_colors_at_top_left()
45 self.assert_equal(rgb, [221, 242, 231]) # Looks greenish
46 self.click_with_offset("canvas", 500, 350)
47 self.highlight("canvas", loops=5)
48 rgb = self.get_canvas_pixel_colors_at_top_left()
49 self.assert_equal(rgb, [39, 42, 56]) # Blue by hamburger

Callers

nothing calls this directly

Calls 8

skipMethod · 0.80
gotoMethod · 0.45
goto_if_not_urlMethod · 0.45
assert_title_containsMethod · 0.45
highlightMethod · 0.45
assert_equalMethod · 0.45
click_with_offsetMethod · 0.45

Tested by

no test coverage detected