I have this hyper link to a document as...
<a _ngcontent-bcl-c5="" class="card-title" ng-reflect-router-link="/activityDetail,c2efa137-0cf3-" href="/activityDetail/c2efa137-0cf3-8997-bedb-94520063517b">AMA_LEARNING_AMA-2019-088</a>
I used the xpath as
By.xpath("//a[contains(@href,'activityDetail')]") (OR)
By.xpath("//a[contains(@href,'/activityDetail/')]")
Of course, it is an angular application, I am trying to use Selenium with Java. Most of the web element locators are working fine, except this one. When I tried it in the dev tools window, it correctly located 2 such elements, but when I ran the test none of them got located. Yes, I could have used ngWebDriver tool, but not many of angular attributes are present to use it, though. Any helpful suggestion, please ?