How do I get a value from href?
like this eg:
Test 2条回答 别跟我提以往 (楼主) 2021-02-05 10:57 You have pointed your element to 'div' instead of 'a' Try the below code driverCE.findElement(By.xpath("//div[@id='testId']/a")).getAttribute("href"); 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
You have pointed your element to 'div' instead of 'a'
Try the below code
driverCE.findElement(By.xpath("//div[@id='testId']/a")).getAttribute("href");