Skip to content
Tags

File uploads to website in Coded UI Test

by on July 25, 2012

A colleague of mine at work brought this to my attention, so I could share it on here:

After recording a test, I noticed that the test failed. I could trace the root cause of the issue to a file upload I did during the test.  It seems like when selecting  a file in a web application, you get “C:\fakepath” for the location of the file you selected.

In my case I had to upload a document from the local disk. When I replayed this action I got the c:\Fakepath folder instead.

This Fakepath comes from Internet Explorer and is a security feature which hides the real path selected path. The workaround to get the action recording up and running is to add the site to the trusted sites in the security tab of IE options.

Good info to know

From → Coded UI Test

Leave a Comment

Leave a comment

NE1 Atoll

The Official blog of NE1 Games

Selenium for .Net using C# language

Adventures in Coding, gaming and other fun things in my life

Coded UI 101 - Understanding Coded UI Tests

Adventures in Coding, gaming and other fun things in my life