java - Error with xpath on automation selenium -


i have html code on ui

<a href="javascript: void edit('edit_total_amt')" title="override total tax amount" onmouseover="status='override total tax amount'; return true">0.00</a> 

and have select webelement identified tag option text auto. try solution like:

public void clickonitemtax () {         tag = by.xpath("//a[contains(@title,'override total tax percent')]");          //by tag = by.xpath("//a[contains(@title,'total tax')]");         //by tag = by.name("totaltaxpercent");         this.sleep(3);         if (this.waitforexistence(tag, 60)) {             webelement domlink = linkget(tag);             domlink.click();         } else {             jlog.fail("attempting click on item tax not found :" + tag );         } } 

error getting :

fail: attempting click on item tax not found :by.xpath: //a[contains(@title,'override total tax percent')]

kindly advise , you

judging html sample providing wrong selector in xpath, should be:

by tag = by.xpath("//a[contains(@title,'override total tax amount')]"); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -