Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:38:22+00:00 2026-05-25T09:38:22+00:00

I’ve been writing test automation (in Selenium2 Java, Firefox 3.6) of an application that

  • 0

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:

<div class="x-form-item " tabindex="-1">
<label class="x-form-item-label" style="width: 250px;" for="ext-comp-1022">Interface Username:</label>
<div id="x-form-el-ext-comp-1022" class="x-form-element" style="padding-left: 255px;">
<input id="ext-comp-1022" class=" x-form-text x-form-field " type="text" name="interfaceUsername" autocomplete="off" size="20" style="width: 292px;">
</div>

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 this post 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.

Thanks,
Sabrina

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:38:23+00:00Added an answer on May 25, 2026 at 9:38 am

    I still don’t know how to determine what script is being called, but with the advice of a helpful coworker I came up with this workaround:

    String userid=driver.findElementByName("interfaceUsername").getAttribute("id");
    String username=(String)js.executeScript("return Ext.getCmp('"+userid+"').getValue()");
    

    With the name of the element I get the id (whatever it is that day) and then I call executeScript to find out what the text field value is. It lacks elegance but then ExtJS does not promote elegance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.