How to verify the Value of textbox - Visible in the UI is not present in the DOM

136 views
Skip to first unread message

Satheesh Jayabalan

unread,
Apr 26, 2016, 11:41:52 PM4/26/16
to seleniu...@googlegroups.com
Folks,

I am testing an application built upon extJS.
Its a user profile page which has an email text box.  I have added an email and saved it.
Revisit the page to verify the data is present . I could see the data in the UI but insepct this element does not have any value associated to this element.

Or the entire DOM did not have this value anywhere.

I am wondering how can an Inspect DOM could not have a value which is visible in the UI ?

Below is the code snippet of that element.

<input id="rsatextfield-1157-inputEl" data-ref="inputEl" type="text" size="1" name="rsatextfield-1157-inputEl" placeholder="EMail" role="textbox" aria-hidden="false" aria-disabled="false" aria-readonly="false" aria-invalid="false" aria-required="false" class="x-form-field x-form-text x-form-text-rsa-text " autocomplete="off" data-componentid="rsatextfield-1157">

Is there a way to verify the value present in the text box ?

--
_______________________

Satheesh.J
99012 00778
_______________________
Message has been deleted

Jegadeesh mani

unread,
Apr 27, 2016, 1:17:20 AM4/27/16
to seleniu...@googlegroups.com

Hi Satish, 

Use the below condition .

For ex:

Invisibletext= wait.until(expected condition.invisibilityofelementwithtext(by.xpath);

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CACbmUWG%2BAMkLjsds%2BtpR1QGSuJBqbEJ2Oo4wrSk%2BL%3DMuOTdjqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Satheesh Jayabalan

unread,
Apr 27, 2016, 1:20:37 AM4/27/16
to seleniu...@googlegroups.com
Hi Jagadeesh,

Its not about waiting for the wait..  Even after waiting 10 mins,  the value wont be there in the inspect DOM.
It is simply not present.

I have checked in the DEV environment .

Question is how the value is not present in the DOM when it is visible.

They use extjs bind value to this text box.


For more options, visit https://groups.google.com/d/optout.

Satheesh Jayabalan

unread,
Apr 28, 2016, 8:55:45 PM4/28/16
to Selenium Users
HI,

I am able to get the value of textbox using javascript.

JavascriptExecutor jsObj = new JavascriptExecutor();
String textValue=(String)jsObj.executeScript("return arguments[0].value", textBoxElement)));

Thanks
Reply all
Reply to author
Forward
0 new messages