如何找到给定文本的组合xpath为<PMP&8999 POINTS>?

时间:2018-06-29 08:31:58

标签: selenium xpath

我想找到文本<PMP & 8999 points>的组合xpath,如下所示:

<div class="col-md-12 lng_lists">
    <div class="lng_detail_content">
        <div class="lng_img_block">
            <img src="https://cfs22.simplicdn.net/ice9/course_images/160x160/PMP_v2.svgz" class="learnngrow_image">
        </div>
        <div class="text_action">
            <div class="lng_text">
                <div class="lng-info">
                   <h5 style="margin:0;">PMP</h5>
                   <span>(Duration: 29 hrs | Difficulty: Intermediate | Language: english | Mode Of Training: online)</span>
                   <div class="price"> &nbsp;8999&nbsp;Points</div>
                </div>
            </div>

1 个答案:

答案 0 :(得分:0)

您可以尝试使用以下x路径,

//div[@class='lng-info']/*[name()='h5' or name()='div']