[Solved] i want to extract the href having same classname in selenium [closed]
[ad_1] You can use this code: String hrefValue = driver.FindElement(By.XPath(“//li/span[@class=”mreinfp comp-text”]/a[@href]”)).getAttribute(“href”); You will have the href value in hrefValue 1 [ad_2] solved i want to extract the href having same classname in selenium [closed]