title: python selenium attach file, no elements to interact with
body: <p>I'm trying to attach file using selenium but the web site does not have element to interact with. I tried sending keys to multiple elements in this code which are related to attachment but Selenium needs an element with a type=&quot;file&quot; but in this case there is none. Website is also using javascript.
  here is the code from website</p>
  <pre><code>&lt;div id=&quot;multiattaches&quot; class=&quot;multiattaches&quot;&gt;
      
             &lt;div class=&quot;multiattaches__content multiattaches__content_hidden&quot; id=&quot;attachesContent&quot;&gt;
              &lt;div class=&quot;multiattaches__title&quot;&gt;Attached files&lt;/div&gt;
              &lt;div class=&quot;multiattaches__clear&quot; id=&quot;attachesClearContent&quot;&gt;Delete all&lt;/div&gt;
              &lt;ol class=&quot;multiattaches__list&quot; id=&quot;attachesList&quot;&gt;
                  
              &lt;/ol&gt;
          &lt;/div&gt;
      &lt;div id=&quot;newAttachesLink&quot; class=&quot;multiattaches__button&quot; title=&quot;Attach a file&quot;&gt;
          &lt;i class=&quot;multiattaches__icon_attach&quot;&gt;&lt;/i&gt;&lt;span class=&quot;multiattaches__button__text&quot;&gt;Attach&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class=&quot;multiattaches__count-attaches multiattaches__count-attaches_hidden&quot; id=&quot;attachesCount&quot;&gt;
          Files: &lt;span id=&quot;attachesCountValue&quot;&gt;-1&lt;/span&gt;
      &lt;/div&gt;
      &lt;p id=&quot;newAttaches_info&quot; class=&quot;new-attaches__info&quot;&gt;Attach up to 32 files maximum 16 Mb per upload&amp;nbsp;(.zip .txt .log .mqh .ex5 .mq5 .mq4 .ex4 .mt5 .set .tpl .cl .py .sqlite .csv .ipynb .gif .png .jpg .jpeg)&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I can click on these 2 elements and upload dialog box will appear but I cannot send keys with the file I want to add, error appears that it is not possible to interact with these elements</p>
  <pre><code>        &lt;i class=&quot;multiattaches__icon_attach&quot;&gt;&lt;/i&gt;
  &lt;span class=&quot;multiattaches__button__text&quot;&gt;Attach&lt;/span&gt;
  </code></pre>
  <p>Is it even possible to attach files using selenium in this case?
  If not is there a solution how to bypass this?</p>
  <p>I manually disabled javascript for the page, refreshed it and tried clicking on attachment buttons, nothing happens(again confirming that it using js)</p>
  <p>I'm don't understand much about javascript so this might be false but imo only way to add file in this case is to create and execute script that functions similar to original but instead of intercepting the file from dialog box it would directly forward it. I just don't know how to do that.</p>