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

Method slow_click

seleniumbase/fixtures/base_case.py:679–698  ·  view source on GitHub ↗

Similar to click(), but pauses for a brief moment before clicking. When used in combination with setting the user-agent, you can often bypass bot-detection by tricking websites into thinking that you're not a bot. (Useful on websites that block web automation tools.)

(self, selector, by="css selector", timeout=None)

Source from the content-addressed store, hash-verified

677 self.__set_esc_skip()
678
679 def slow_click(self, selector, by="css selector", timeout=None):
680 """Similar to click(), but pauses for a brief moment before clicking.
681 When used in combination with setting the user-agent, you can often
682 bypass bot-detection by tricking websites into thinking that you're
683 not a bot. (Useful on websites that block web automation tools.)
684 To set the user-agent, use: ``--agent=AGENT``.
685 Here's an example message from GitHub's bot-blocker:
686 ``You have triggered an abuse detection mechanism...`` """
687 self.__check_scope()
688 if not timeout:
689 timeout = settings.SMALL_TIMEOUT
690 if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
691 timeout = self.__get_new_timeout(timeout)
692 if not self.demo_mode and not self.slow_mode:
693 self.click(selector, by=by, timeout=timeout, delay=1.05)
694 elif self.slow_mode:
695 self.click(selector, by=by, timeout=timeout, delay=0.65)
696 else:
697 # Demo Mode already includes a small delay
698 self.click(selector, by=by, timeout=timeout, delay=0.25)
699
700 def double_click(self, selector, by="css selector", timeout=None):
701 self.__check_scope()

Callers 11

slow_click_elementFunction · 0.80
klik_langzaamMethod · 0.80
cliquer_lentementMethod · 0.80
clic_lentamenteMethod · 0.80
clic_lentamenteMethod · 0.80
천천히_클릭Method · 0.80
慢单击Method · 0.80
clique_devagarMethod · 0.80
test_githubMethod · 0.80

Calls 3

__check_scopeMethod · 0.95
__get_new_timeoutMethod · 0.95
clickMethod · 0.95

Tested by 1

test_githubMethod · 0.64