java - how do we get the span value -


below html code

<div class="form-row">     <div class="label-column"> renewal charges</div>     <div class="ctrl-column">         <span data-bind="html: displayyourrenewalcharges">             <span class="currencysymbol">usd</span>                 95.00             </span> 

i want scrap renewal amount (i.e usd 95.00)

my xpath:

string renewalcharge = driver             .findelement(                     by.xpath("//div[contains(@data-bind,'html: displayyourrenewalcharges')]"))             .gettext(); 

my question value available in span class, above xpath not fetching value

so please suggest how re-frame xpath, getting value

try this.

driver.findelement(by.xpath("//span[@data-bind='html: displayyourrenewalcharges']")).gettext() 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -