title: Upload a file in browser using Robot Framework Test
body: <p>I'm writing Test Cases using <strong>Robot Framework</strong> and <strong>Selenium</strong> for my Web application. I tried to Upload a file, but I can't its failing.</p>
  
  <p>My Code is</p>
  
  <pre><code>*** Variables ***
  ${TVAURL}     http://localhost:1500/
  ${Browser}    Firefox
  
  TC_01: Enter into the application
      [Documentation]   Enter into the application to upload a file
      Open Browser   ${TVAURL}     ${Browser}
      maximize browser window
      Choose File ........
  </code></pre>
  
  <p>HTML File:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Upload File&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
      Select image to upload:
      &lt;input type="file" name="fileToUpload" id="fileToUpload"&gt;
      &lt;input type="submit" value="Upload Image" name="submit"&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I need to know how to use this <strong><code>Choose File</code></strong> for this file upload test. I don't know how to do this. I need to upload a file automatically without any third party tools like Autoit, etc.,</p>
  
  <p>I referred the following <a href="http://robotframework.org/Selenium2Library/Selenium2Library.html#Choose%20File" rel="nofollow noreferrer">http://robotframework.org/Selenium2Library/Selenium2Library.html#Choose%20File</a></p>
  
  <p>Moreover I referred the following questions too</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/32620136/file-upload-option-in-automation-testing-using-robot-framework">File Upload Option in Automation Testing Using Robot Framework</a></li>
  <li><a href="https://github.com/robotframework/OldSeleniumLibrary/issues/108" rel="nofollow noreferrer">https://github.com/robotframework/OldSeleniumLibrary/issues/108</a></li>
  </ul>
  
  <p>But I can't get any solutions. Kindly assist me how to do this using Robot Framework, Selenium in Pycharm Studio.</p>
  
  <p><strong>Reply for Answer #1: @demouser123</strong></p>
  
  <p>Still I'm having issue, here with I have attached the Screen shot</p>
  
  <p><a href="https://i.stack.imgur.com/hOAfA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hOAfA.jpg" alt="enter image description here"></a></p>
  
  <p>It always opens the Desktop, and fails. Kindly assist me.</p>
  
  <p>I trided the following code</p>
  
  <pre><code>*** Variables ***
  ${PO_AddShell}     //*[@id="fileToUpload"]
  
  click button  ${PO_AddShell}
  Choose File   ${PO_AddShell}    E://Project/Publish/SampleTest.1500/rose.jpg
  </code></pre>