Xpath Expression Clarity – Java Selenium
I was practicing my x-path by clicking on YouTube videos trending section. On the trending section I want to click on second video present irrespective of whichever video is present. I have written below x-path to target the second video.
Below is the x-path using the text method.
//*[contains(text(),”1 day ago”)]