I have used Coded UI Tests, but used Selenium Webdriver much more extensively. In my answer I will completely ignore the record and playback capabilities of both because I would not advocate using either except to familiarize yourself with the tool. In addition, I won't comment on features that one has vs the other because they are very nearly identical. Anything you can do with one tool you can do in some way or another with the other tool with very nearly the same amount of effort.
I use Selenium because it is free, and because until recently Coded UI Tests only supported IE by default. Recently they added support out of the box for Chrome and Firefox, which makes me want to re-evaluate it.
What I will focus my answer on is the ease of use of the APIs. I actually prefer the Coded UI API over Selenium WebDriver's API.
Here are some reasons why I prefer the Coded UI API:
- Elements are strongly typed i.e. a Link is an HtmlHyperLink object. In selenium, everything is an IWebElement which means that every element has the same properties and methods regardless of whether they are actually useful, or even available. Strongly typed elements make the intellisense much more useful because you KNOW if a method or property is exposed that you can actually use it without a runtime "not supported" error.
- I prefer HtmlHyperLink myLink = new HtmlHyperLink(...) syntax over IWebElement myLink = webdriver.FindElement(By.CssSelector(...)) This is my preference, it seems more intuitive to me and follows standard object oriented coding practices.
- I really like having the GetChildren, GetParent, GetDesendants methods.
There are probably a few more, but that's generally it. If you're looking for an answer to "What is Coded UI Tests missing that will make my life painful?", I would say it's not really missing anything, all of the standard stuff is there.
One thing to point out is that I built an abstraction layer on top of Selenium and made the API very similar to Coded UI's API, so it is possible to have all of this and still use selenium, just more up front work.