You will need to actually load webDavUrl ... item.loadWebDavUrl (). You will need to install an event handler, but notify as soon as the WebDav URL has been loaded as its asynchronous method. Here's a sample that includes downloading and installing an event handler:
var item = $models.getItem(selectedItem), webDavUrl = item.getWebDavUrl(); if (!webDavUrl) {
Hope this helps!
source share