In my selenium c# windows forms application, I have a scenario like uploading a doc/docx file. I have already done uploading in some another case.since it has some text box
Since its a OS dialog box you cannot handle it with selenium , you can use java script executor check this link Webdriver: File Upload
We can Not handle windows fileOpenDialog through Selenium. we have to use either Javascript executor but some time still it is not possible to use Javascriptexecutor. it won't execute. It gives null value error. Example :
If you go to naukri.com on below link http://my.naukri.com/manager/createacc2.php?othersrcp=11499&wExp=N or
<input type="file" id="browsecv" name="browsecv"></input>
to upload the file.
your javascript and selenium wont identify the browse element.
Then we have to use third party tool such as Point Position to compute x & Y coordinate of "browsefile" Button then, we can use C#.Net low level MouseClick handle to click on it or we can use AutoIt tool to handle wondows pop. To know more you can visit on
http://avinashpandeblogsonseleniumautomation.blogspot.in/2015/06/upload-file-using-selenium-web-driver.html you will get solution with an example.