The following is the source code that I am attempting to work with. I have attempted to use methods such as:
driver.FindElement(By.XPath("//span[@data-bind = 'text: Caption']")).Click();
driver.FindElement((By.XPath("//*[contains(text(),'document')]"))).Click();
All the conventional selenium methods that I have been using in my project have not been able to find anything.
<div class="caption" data-bind="css: { 'doc-downloader-wrapper': $data.IsDocument() }">
<a data-bind="css: { 'protected': IsProtectedDocument(), 'doc-downloader': $data.IsDocument(), 'no- details': !$data.HasDetails() }, attr: { href: Link, target: $data.IsLinkDocument() ? '_blank' : '_self' }">
<span data-bind="text: Caption"></span>
</a>
</div>