Note that there are some explanatory texts on larger screens.

plurals
  1. POExt JS concealing text field contents from HTML and Selenium
    primarykey
    data
    text
    <p>I've been writing test automation (in Selenium2 Java, Firefox 3.6) of an application that uses a lot of ExtJS. I have been able to work around the mighty morphing element ids pretty well, but on one page the code behavior has me stumped. There is a text field where a username can be set. It isn't clickable until the edit button is clicked, and then Firebug can find the text field. If text is entered and then saved, the text is visible on the page but it does not appear anywhere in the HTML code. Even if the edit button is clicked again to make the text field accessible, I can't get the value of the text field. This is the code for the label and text field in edit mode:</p> <pre><code>&lt;div class="x-form-item " tabindex="-1"&gt; &lt;label class="x-form-item-label" style="width: 250px;" for="ext-comp-1022"&gt;Interface Username:&lt;/label&gt; &lt;div id="x-form-el-ext-comp-1022" class="x-form-element" style="padding-left: 255px;"&gt; &lt;input id="ext-comp-1022" class=" x-form-text x-form-field " type="text" name="interfaceUsername" autocomplete="off" size="20" style="width: 292px;"&gt; &lt;/div&gt; </code></pre> <p>Note that the label "Username:" displays in the HTML as expected, but there's nothing for the textfield itself. I'm suspecting that a javascript call is getting and displaying the text in the text field, but I'm not at all familiar with ExtJS. I checked out <a href="https://stackoverflow.com/questions/107314/any-suggestions-for-testing-extjs-code-in-a-browser-preferably-with-selenium">this post</a> but it did not apply to getting text, mostly just the changing ID problem. So, I would like to understand how to figure out what script is being called, and how to use executeScript to grab the textfield text with it. I'm able to enter text in the field with Selenium, save it with Selenium, and see it on the page by eyeball so I'm not having problems with the Selenium code itself locating the element.</p> <p>Thanks, Sabrina</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload