selenium webdriver - Testing of pre -filled text in a text box -


i have text box , data gets pre-filled in text-box.how verify text inside text box.

html code :-

<div id="blkinner_first_name_readonly" class="bhtextfieldwrapper"> <label class="blk_lbl" for="id_first_name_readonly">your first name</label> <input id="id_first_name_readonly" class="bhtextfield" type="text" disabled="disabled" value="" name="first_name_readonly"> </div> </div> 

since have not mentioned binding using, assume it's java. if following should work

webelement element = driver.findelement(by.id("id_first_name_readonly"));  //find attribute value stores value of auto field name  string name = element.getattribute("value"); 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -