selenium+java<a>里面写<p> 定位到<p>怎么点击<a>
<html><body><divclass="starta"><ahref="http://www.baidu.com"><divclass="course-box"><...
<html><body><div class="starta"> <a href="http://www.baidu.com"> <div class="course-box"> <div class="box"> <div class="img-box"> <div class="course-gradient"></div> <img class="course-img" src="//img/101.jpg"> <div class="lecturer-info"> <div class="course-intro"> <p class="course-name" title="Vue2.5开发APP实战项目">Vue2.5开发APP实战项目</p> </div> </div> </div> </div> </div> </a></div><div class="startb"> <a href="http://www.163.com"> <div class="course-box"> <div class="box"> <div class="img-box"> <div class="course-gradient"></div> <img class="course-img" src="//img/101.jpg"> <div class="lecturer-info"> <div class="course-intro"> <p class="course-name" title="maven实战项目">maven实战项目</p> </div> </div> </div> </div> </div> </a></div></body></html>问题:因为使用遍历element定位到<p>的text了,但是元素点击的时候element.click();,后台报错:org.openqa.selenium.WebDriverException: unknown error: Element <p class="****" title="..."> Vue2.5开发……</p> is not clickable at point。怎么从定位<p>可以点击
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询