title: how to hover over multiple elements using Python
body: <p>I'm trying to hover over not only one point but the multiple points after one by one.
  The point here means each user's image profile (There are 5 of them for each page).
  The reason why I do this is that I try to parse each user's link profile.
  But tricky part is that the html codes are hidden. In other words, it doesn't show up unless if I hover over each user's profile or picture.
  Let me jump straight to my code.</p>
  
  <pre><code>from selenium.webdriver import ActionChains
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.webdriver.common.by import By
  from selenium.webdriver.support.ui import WebDriverWait as wait
  from bs4 import BeautifulSoup
  from selenium import webdriver
  
  #Incognito Mode
  option=webdriver.ChromeOptions()
  option.add_argument("--incognito")
  
  #Open Chrome
  driver=webdriver.Chrome(executable_path="C:/Users/chromedriver.exe",options=option)
  
  #Get the link
  driver.get("https://www.tripadvisor.com/VacationRentalReview-g60742-d7951369-or20-Groove_Stone_Getaway-Asheville_North_Carolina.html")
  
  #This is the first time for me to use Xpath so please understand if there's something wrong with my code
  profile=driver.find_element_by_xpath("//div[@class='mainContent']")
  profile_pic=profile.find_element_by_xpath("//div[@class='ui_avatar large']")
  
  ActionChains(driver).move_to_element(profile_pic).perform()
  ActionChains(driver).move_to_element(profile_pic).click().perform()
  
  profile_box=driver.find_element_by_xpath('//span//a[contains(@href,"/Profile/")]').get_attribute("href")
  print (profile_box)
  </code></pre>
  
  <p>How do I hover over the multiple users (who has the same Xpath codes) in this case? </p>
  
  <p><br>===============================updated codes==========================</p>
  
  <pre><code>num_page=0
  
  #Incognito Mode
  option=webdriver.ChromeOptions()
  option.add_argument("--incognito")
  
  #Open Chrome
  driver=webdriver.Chrome(executable_path="C:/Users/chromedriver.exe",options=option)
  driver.implicitly_wait(10)
  
  #Type in URL you want to visit
  driver.get("https://www.tripadvisor.com/VacationRentalReview-g60742-d7951369-Groove_Stone_Getaway-Asheville_North_Carolina.html")
  driver.maximize_window()
  time.sleep(5)
  
  #loop over multiple pages.
  for j in range(1,16,1):
      time.sleep(5)
      try:
  
          #finds all the comments or profile pics
          profile_pic= driver.find_elements(By.XPATH,"//div[@class='prw_rup prw_reviews_member_info_hsx']//div[@class='ui_avatar large']")
  
          time.sleep(3)
  
          for i in profile_pic:
                  #clicks all the profile pic one by one
                  ActionChains(driver).move_to_element(i).perform()
                  time.sleep(2)
                  ActionChains(driver).move_to_element(i).click().perform()
                  time.sleep(4)
                  #print the href or link value
                  profile_box=driver.find_element_by_xpath('//span//a[contains(@href,"/Profile/")]').get_attribute("href")
                  time.sleep(3)
                  print (profile_box)
      except:
          pass
  
  
      #click the next button to go to the next page.
      link = driver.find_element_by_link_text('Next')
      #Another element is covering the element you are to click.
      #You could use execute_script() to click on this.    
      driver.execute_script("arguments[0].click();", link)
  
      #After a certain number of pages, use break function to escape from the loop.
      num_page=num_page+1
      if num_page==14:
          break
  
  </code></pre>
  
  <p><br>Thanks to Yosuva A, I could solve how to hover over the multiple users in the same page and could parse the data. I tried to develop the code more so that I loop over the multiple pages (each page includes 5 users). 
  My updated code surely iterates through multiple pages but at some random point, the code only parse the same user profile links. 
  Here's the output example I get:</p>
  
  <pre><code>https://www.tripadvisor.com/Profile/Cftra
  https://www.tripadvisor.com/Profile/jessicarZ577PF
  https://www.tripadvisor.com/Profile/BackPacker115730
  https://www.tripadvisor.com/Profile/nanm
  https://www.tripadvisor.com/Profile/kukimama
  https://www.tripadvisor.com/Profile/ThreeColeys
  https://www.tripadvisor.com/Profile/AlanS990
  https://www.tripadvisor.com/Profile/S5227HKlisas
  https://www.tripadvisor.com/Profile/H1493VRmatthewt
  https://www.tripadvisor.com/Profile/H1493VRmatthewt
  https://www.tripadvisor.com/Profile/H1493VRmatthewt
  https://www.tripadvisor.com/Profile/H1493VRmatthewt
  https://www.tripadvisor.com/Profile/H1493VRmatthewt
  </code></pre>
  
  <p>I thought I needed to add time sleep function so put those in several lines but still having the same issue. Could someone help me out and this occurs and how to get over it?
  Thank you. </p>