You'll have to actually load the webDavUrl... item.loadWebDavUrl(). You'll have to set an event handler though to notify once the WebDav URL has been loaded as its an asynchronous method. Here's a sample that includes loading and setting an event handler:
var item = $models.getItem(selectedItem),
webDavUrl = item.getWebDavUrl();
if (!webDavUrl) {
// WebDavUrl for cached item hasn't been loaded yet, so lets load it.
$evt.addEventHandler(item, "loadwebdavurl", function (event) {
webDavUrl = item.getWebDavUrl(); // also could do event.source.getWebDavUrl()
});
item.loadWebDavUrl();
}
Hope that helps!