MCPcopy Index your code
hub / github.com/seleniumbase/SeleniumBase / hover

Method hover

seleniumbase/fixtures/base_case.py:2725–2752  ·  view source on GitHub ↗
(self, selector, by="css selector", timeout=None)

Source from the content-addressed store, hash-verified

2723 )
2724
2725 def hover(self, selector, by="css selector", timeout=None):
2726 self.__check_scope()
2727 if not timeout:
2728 timeout = settings.SMALL_TIMEOUT
2729 if self.timeout_multiplier and timeout == settings.SMALL_TIMEOUT:
2730 timeout = self.__get_new_timeout(timeout)
2731 original_selector = selector
2732 original_by = by
2733 selector, by = self.__recalculate_selector(selector, by)
2734 if self.__is_cdp_swap_needed():
2735 self.cdp.hover_element(selector)
2736 return
2737 self.wait_for_element_visible(
2738 original_selector, by=original_by, timeout=timeout
2739 )
2740 self.__demo_mode_highlight_if_active(original_selector, original_by)
2741 self.scroll_to(selector, by=by)
2742 time.sleep(0.05) # Settle down from scrolling before hovering
2743 element = page_actions.hover_on_element(self.driver, selector, by)
2744 if self.recorder_mode and self.__current_url_is_recordable():
2745 if self.get_session_storage_item("pause_recorder") == "no":
2746 if by == By.XPATH:
2747 selector = original_selector
2748 time_stamp = self.execute_script("return Date.now();")
2749 origin = self.get_origin()
2750 action = ["hover", selector, origin, time_stamp]
2751 self.__extra_actions.append(action)
2752 return element
2753
2754 def hover_and_click(
2755 self,

Callers 14

hover_elementMethod · 0.95
hover_on_elementMethod · 0.95
hover_over_elementMethod · 0.95
hoverFunction · 0.80
zwevenMethod · 0.80
survol_de_la_sourisMethod · 0.80
passaggio_del_mouseMethod · 0.80
pasar_el_ratónMethod · 0.80
마우스오버Method · 0.80
マウスオーバーMethod · 0.80
鼠标悬停Method · 0.80

Calls 14

__check_scopeMethod · 0.95
__get_new_timeoutMethod · 0.95
__is_cdp_swap_neededMethod · 0.95
scroll_toMethod · 0.95
execute_scriptMethod · 0.95
get_originMethod · 0.95
hover_on_elementMethod · 0.80

Tested by 1