selenium - XPath, webdriver: How to get the element text? -


<div class="request-credentials-view drawer">   <div class="tip-inner" style="width: 686px;">     <div class="drawer-arrow" style="left: 926.55px;"></div>     <h3 class="heading">we've sent email </h3> 

need fetch text "we've sent email". when used bellow in x-path checker:

//div[@class='request-credentials-view drawer']//h3[@class='heading']//*[text()="we've sent email"] 

got "no match found". also:

 //div[@class='request-credentials-view drawer']//h3[(@class='heading')]//*[text()='<template>']  

doesn't work in selenium web driver code.

have tried contains() function

//h3[contains(text(),"we've sent email")] 

one thing contains can partial match in text() specially excluding white spaces


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -