PDA

View Full Version : Why I don't see the value of textfield in the dom?



SebTardif
16 Aug 2012, 6:46 AM
I'm working on a specialized framework doing UI automated test using Selenium driven with Ext JS component query expressions. In Selenium, one of the most popular function is WebElement.getText() but it's returning empty string with Ext JS 4.1.1 textfield. I took a look at the DOM, and yes, the text value shown in the browser is nowhere to be found in the browser DOM...

You can reproduce with Sencha example, like with: http://docs.sencha.com/ext-js/4-1/#!/example/form/field-types.html

(http://docs.sencha.com/ext-js/4-1/#!/example/form/field-types.html)If you use the browser debugger to ask the dom for the first textfield and have enter different text than the default you will not see the new text in the dom.

Tim Toady
16 Aug 2012, 11:13 AM
http://docs.sencha.com/ext-js/4-1/extjs-build/examples/form/field-types.html
This link isn't in an iframe and when I run the following code in firebug it gives me the expected value


document.getElementsByTagName( 'input' )[0].value