How to extract text from tag using Selenium pageobject?
This is the html code:
<div class="post-actions__body" style="display: block;">
<span class="title">Reply from:</span>
<input class="account-input" value="" disabled="">
<textarea class="reply-text-area"></textarea>
<a class="btn-post-message btn--inactive" href="#">Post</a>
<!--<span class="character-count">63206</span>--></div>
I’m trying to extract text from the input tag: input class="account-input" value="" disabled="", the text (“account one”) is visible on the GUI.
This is how I define the pageobject:
div(:reply_account, :css => '.post-actions__body .account-input')
I’ve tried using reply_account_element.getText(), .getValue(), .getAttribute(), but none of them work. Please advise, thanks!