The following is the HTML structure:
12345 abc 2条回答 -上瘾入骨i (楼主) 2021-01-23 11:56 Try the below xpath: code = '23456' element = driver.find_element_by_xpath("//p[@class='code' and text()='" +code +"']") 0 讨论(0) 查看其它2个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
12345
abc
Try the below xpath:
code = '23456' element = driver.find_element_by_xpath("//p[@class='code' and text()='" +code +"']")