title: Finding XPATH for a date field where the right click is disabled - Selenium Python
body: <p>I am trying to find the xpath for the DOB field in the following URL. I can click the calendar but after clicking, the right-click is disabled. SO I have used javascript executor to parse the date value like below</p>
  <p><a href="https://diy.iiflinsurance.com/form/proposer-form?quote_id=Mr6ynrRUPktQJ8bHk1ix" rel="nofollow noreferrer">URL</a></p>
  <pre><code>element = WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.XPATH, &quot;//input[@type='date']&quot;)))
  self.driver.execute_script(&quot;arguments[0].value = arguments[1]&quot;, element, &quot;2004-03-18&quot;)
  </code></pre>
  <p>Here after parsing, the date 18th march, 2004 is getting populated successfully in the application webpage but still I am not able to click &quot;Next&quot; due to the error(&quot;format not correct&quot;). I have checked that until and unless I click the calendar and Click/Press Enter, its not going to work.</p>
  <p>I have tried to press Enter after clicking using the below code. But its having an error &quot;TypeError: 'str' object is not callable&quot;</p>
  <pre><code> a = self.driver.find_element(By.XPATH, configReader.readConfig(&quot;locators&quot;, locator)).click()
   b = Keys.ENTER
  </code></pre>
  <p>My target is the following</p>
  <pre><code>1:Parse the date using java script executor
  2:Click the date icon using xpath = //input[@type='date']
  3:Press Enter
  </code></pre>