title: Upload APK with Python and Selenium to web page interpreted as URL
body: <p>I want to <em>upload</em> a .apk file to Kaspersky's online scanner by using selenium and Python. However, the file is interpreted as a URL when I use selenium's send_keys() method. </p>
  
  <p>The relevant HTML looks like this:</p>
  
  <pre><code>    &lt;div class="container"&gt;
        &lt;div class="div-field-home"&gt;
          &lt;div class="div-hero-scanner-wrapper"&gt;
  &lt;!-- ======= --&gt;
  
            &lt;div class="acenter pdv-1x" id="drop-area"&gt;
              &lt;form action="" id="SendForm"&gt;
                &lt;div class="d-inline"&gt;
                    &lt;div class="tags-inline amiddle file-load-group"&gt;
                        &lt;input id="txt-input-01" type="text" class="small" placeholder="Drag-and-drop a file or paste a link here" maxlength="2000" txtvalue=""&gt;
                        &lt;a href="#" class="d-inline bt-attach bt-attach-file"&gt;&lt;img src="/resources/img/attach.png" class="w-100" alt=""&gt;&lt;img src="/resources/img/attach_inactive.png" class="w-100" alt=""&gt;&lt;/a&gt;
                        &lt;a href="#" class="btn upper small bt-attach-res bt-attach-file"&gt;Attach file&lt;/a&gt;
                        &lt;a href="#" class="btn upper clr-ff bg-02 small bt-check bt-disable" analytics-event="StartScan.Click"&gt;Scan&lt;/a&gt;
                    &lt;/div&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>kaspersky_base_URL = "https://virusdesk.kaspersky.com/#"
  
  driver = webdriver.Firefox()
  driver.get(kaspersky_base_URL)
  file = "/home/user/filepath"
  
  driver.implicitly_wait(30)
  
  input = driver.find_element_by_id("txt-input-01")
  input.send_keys(file)
  
  driver.implicitly_wait(60)
  
  links = driver.find_elements_by_xpath('//a[contains(@href, "#")]')
  for elem in links:
      if 'SCAN' in elem.text:
          elem.click()
  
  </code></pre>
  
  <p>I have also tried to change the input <code>type=text</code> to <code>type=file</code>. It is changed, but the same error keeps occurring. 
  I think that the problem might be that one has to click on the file attack link for the text to be interpreted as a file. But not completely sure.</p>
  
  <p>Any help would be appreciated! </p>