title: perform() and reset_actions() in ActionChains not working selenium python
body: <p>This is the code that habe no error:</p>
  <p><strong>perform() and reset_actions()</strong></p>
  <p>but these two functions have to work combinedly</p>
  <pre><code>import os
  import time
  from selenium import webdriver
  from selenium.webdriver.common.action_chains import ActionChains
  from selenium.webdriver.chrome.options import Options
  from selenium.webdriver.common.keys import Keys
  import random
  
  # Setting the chrome_options
  global chrome_options
  chrome_options = Options()
  chrome_options.add_argument(&quot;--start-maximized&quot;)
  chrome_options.add_argument('--profile-directory=Default')
  prefs = {&quot;profile.default_content_setting_values.notifications&quot;: 2}
  chrome_options.add_experimental_option(&quot;prefs&quot;, prefs)
  chrome_options.add_argument('disable-infobars')
  chrome_options.add_experimental_option(&quot;useAutomationExtension&quot;, False)
  chrome_options.add_experimental_option(&quot;excludeSwitches&quot;, [&quot;enable-automation&quot;])
  
  google_search = [
      &quot;1.' driver.switch_to.active_element' &quot;,
      &quot;2.this code is a one of important snippet for facebook automation.&quot;,
  ]
  
  random_google_search = random.choice(google_search)
  
  # Setting the Chrome Driver
  global driver
  driver = webdriver.Chrome(&quot;chromedriver.exe&quot;, chrome_options=chrome_options)
  
  # Setting the Actions
  global actions
  actions = ActionChains(driver)  
  
      
  #the loop Running
  def navigation():
      time.sleep(5)
      actions.reset_actions()
  
      driver.get(&quot;https://google.com&quot;)
  
      actions.send_keys(random_profile_post)
  
      total_tab = 3
      sleep_time = 1
      implicitly_wait_time = 4
  
      actions.reset_actions()
      driver.implicitly_wait(implicitly_wait_time)
      time.sleep(sleep_time)
  
      for i in range(total_tab):
          actions.send_keys(Keys.TAB)
          print(&quot;Pressing * &quot; + str(i + 1) + &quot; * No Tab&quot;)
  
      actions.send_keys(Keys.ENTER)
      actions.perform()
  
  
  for i in range(10):
      navigation()
      print(&quot;Pressing * &quot; + str(i + 1) + &quot; * st navigation function&quot;)
  </code></pre>
  <p>I am working with <strong>navigation()</strong> functions:</p>
  <p>in the loop area</p>
  <p><strong>actions.send_keys(Keys.TAB)</strong></p>
  <p><strong>actions.reset_actions()</strong></p>
  <p>I need to reset action but it's not reseating previous preform()</p>
  <p>What will be the batter way to do that.</p>
  <p><a href="https://youtu.be/_jR9IldgacQ" rel="noreferrer">Please watch the youtube video for more clear understanding.</a></p>