[英]I need help to get the xpath of the value which is under p tag inside the header
你能帮我提取里面的成分表吗
标签。 我尝试了一些东西并且能够得到直到 header - 成分。 我期待提取价值。 我尝试的路径 - //DIV[@id="important-information"]//h4[text()='Ingredients:']/text()
您可以使用此 xpath 来定位图像中突出显示的第二个 p 标签元素。 xpath 下面可用于自动化,因为它将返回 web 元素-
//div[@id="important-information”]//div[2]//p[2]
如果您直接想从 xpath 获取文本,请使用以下 xpath-
//div[@id="important-information”]//div[2]//p[2]/text()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.