Selenium Webdriver + python - Cannot hide tooltip after mouse over action

I am testing tooltips on my webpage using Selenium WebDriver with Firefox.

I am trying to hover over an element with a tooltip attached. To check if a tooltip is displayed, then hover over another item and check its corresponding tooltip.

element_to_click = claim_section.find_element_by_class_name("arrowBox") hover_mouse = ActionChains(self.driver).move_to_element(element_to_click) hover_mouse.perform() 

At any given time, we check only one hint. But when I run this test, the first hint is not hidden. I tried to move another element on the page, but the tooltip remains visible.

I missed any other action here and what are the possible solutions?

+3
source share
1 answer

If you have more than one hint, make sure you are not using the same ActionChains object. I scroll my hints like this:

 for element in elements: ActionChains(self.driver).move_to_element(element).perform() 
0
source

Source: https://habr.com/ru/post/1469143/


All Articles