Results 1 to 3 of 3

Thread: Gertting the itemId from automation engineer's perspective

  1. #1

    Default Answered: Gertting the itemId from automation engineer's perspective

    The following text is a snipped from the ST docs.

    I am wondering how to get the itemId of sth. if I do not have acces to the source code, only the URL.

    Referencing by "id" or "itemId"

    In general, it's bad practice for developers to set the id on Ext JS components, as this causes issues when trying to create multiple instances of that component on the page. itemId is much more commonly used, as this doesn't cause such conflicts.

    Using the following syntax enables you to reference a component by its id or itemId:

    Code:
    #userGrid
    This can be combined with xtype, so in the case of the following example, a grid that has an itemId of userGrid is returned:

    Code:
    grid#userGrid

  2. The Inspect Wizard in Sencha Test, and the Chrome extension will show whether a component has an "itemId" set. An itemId will not be available unless it has been explicitly set by the developer of the application, as these are not auto-generated by the framework.

    Take the following page as an example: https://examples.sencha.com/extjs/6....configure-grid. The two buttons in this example have "itemId" set in the code (expand the "Details" side panel). Using the Chrome extension to inspect the "Show Offices" button automatically detects the itemId ("#Offices") and includes it in the generated locator, along with the parent panel's xtype ("contentPanel"):

    Code:
    contentPanel button#Offices
    The "itemId" will also be listed under the Component Config tab of the Chrome extension, or the Inspect Wizard in Sencha Studio.

  3. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    349
    Answers
    58

    Default

    The Inspect Wizard in Sencha Test, and the Chrome extension will show whether a component has an "itemId" set. An itemId will not be available unless it has been explicitly set by the developer of the application, as these are not auto-generated by the framework.

    Take the following page as an example: https://examples.sencha.com/extjs/6....configure-grid. The two buttons in this example have "itemId" set in the code (expand the "Details" side panel). Using the Chrome extension to inspect the "Show Offices" button automatically detects the itemId ("#Offices") and includes it in the generated locator, along with the parent panel's xtype ("contentPanel"):

    Code:
    contentPanel button#Offices
    The "itemId" will also be listed under the Component Config tab of the Chrome extension, or the Inspect Wizard in Sencha Studio.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  4. #3

    Default

    https://www.sencha.com/forum/showthr...=1#post1326523

    For further users this thread gives additional insight into this topic

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •