java - capture tooltip of a button using selenium -
am selenium beginner. have no thought how capture tooltip next html code. construction of html:
<a id="aui_3_4_0_1_2236" title="graceful shut downwards of platform , power-off hardware."> <span id="aui_3_4_0_1_2235" class="aui-button"> <span id="aui_3_4_0_1_2234" class="aui-button-`enter code here`content"> <input id="_platformsummaryportlet_war_cpfspgportlet10snapshot_instance_aedwgjz6r6id_soft" class="aui-button-input" type="button" value="soft shutdown" onclick="javascript:soft()" style="display: inline;"/> </span> </span> </a> and title have tooltip value. tried next tooltip:
webelement softshtdwn = driver.findelement(by.xpath(object.softshutdownbutton)); string tooltip = softshtdwn.getattribute("title"); string tooltip1 = softshtdwn.gettext(); string tooltip2 = softshtdwn.getcssvalue("title"); but reason, null value in return. help appreciated. note: cannot utilize by.id id dynamic.
using below logic can tooltip
but, create sure using proper , unique locator required value.
string tooltip=driver.findelement(by.xpath("")).getattribute("title"); if not able build proper xpath post html code here. help you.
java html selenium
No comments:
Post a Comment