title: Python - How to change the input field value using Selenium for
body: <p>I am trying to change the input field value in a form input using Selenium and Python, but unable to do so.</p>
  <p><a href="https://i.stack.imgur.com/XFZpm.png" rel="nofollow noreferrer">See time picker</a></p>
  <p>I want to be able to perform .sendKeys() for each one (Hour, Minutes, Seconds, AM/PM). My code is the following:</p>
  <pre><code>end_time_input = driver.find_element_by_xpath('/html/body/div[4]/div[4]/div[2]/form/ol/li[2]/div/div/div[2]/div[2]/input')
  end_mins_input = driver.find_element_by_css_selector('#ldb\:filter\:list\:1 &gt; div &gt; div &gt; div.mins &gt; div.mi_tx &gt; input')
  end_seconds_input = driver.find_element_by_xpath('//*[@id=&quot;ldb:filter:list:1&quot;]/div/div/div[4]/div[2]/input')
  end_meridian_input = driver.find_element_by_xpath('/html/body/div[4]/div[4]/div[2]/form/ol/li[2]/div/div/div[5]/div[2]/input')
  
  
  time_input.send_keys(&quot;10&quot;)
  end_mins_input.send_keys(&quot;30&quot;)
  end_seconds_input.send_keys(&quot;30&quot;)
  end_meridian_input.send_keys(&quot;AM&quot;)
  </code></pre>
  <p>However, this is not working.</p>
  <p>I also tried changing the value from the main input --&gt; input id=&quot;ldb:filter:list:1:timeInput&quot;</p>
  <pre><code>&gt; &lt;div class=&quot;time_pick&quot; style=&quot;display: inline-block;width: 140px&quot;&gt;
  &lt;input id=&quot;ldb:filter:list:1:timeInput&quot; class=&quot;axw-wdb-time ldb-input&quot; name=&quot;ldb:filter:list:1:timeInput&quot; 
  value=&quot;5:24:25 PM&quot; placeholder=&quot;12:00:00 AM&quot; aria-label=&quot;Time input End DateTime&quot; data-timepicki-tim=&quot;10&quot; 
  data-timepicki-mini=&quot;24&quot; data-timepicki-sec=&quot;25&quot; data-timepicki-meri=&quot;PM&quot; style=&quot;opacity: 1;&quot;&gt;
  &lt;div class=&quot;timepicker_wrap &quot; style=&quot;display: none; top: 20px; left: 0px;&quot;&gt;&lt;div class=&quot;arrow_top&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;time&quot; id=&quot;time_column&quot;&gt;&lt;div class=&quot;prev action-next&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;ti_tx&quot;&gt;&lt;input type=&quot;text&quot; class=&quot;timepicki-input&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;next action-prev&quot;&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;mins&quot;&gt;
  &lt;div class=&quot;prev action-next&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;mi_tx&quot;&gt;
  &lt;input type=&quot;text&quot; class=&quot;timepicki-input&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;next action-prev&quot;&gt;
  &lt;/div&gt;
  &lt;/div&gt;&lt;div class=&quot;seconds&quot;&gt;
  &lt;div class=&quot;prev action-next&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;sec_tx&quot;&gt;
  &lt;input type=&quot;text&quot; class=&quot;timepicki-input&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;next action-prev&quot;&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&quot;meridian&quot; id=&quot;meridian_column&quot;&gt;
  &lt;div class=&quot;prev action-next&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;mer_tx&quot;&gt;
  &lt;input type=&quot;text&quot; class=&quot;timepicki-input&quot; readonly=&quot;&quot;&gt;
  &lt;/div&gt;
  &lt;div class=&quot;next action-prev&quot;&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>