Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    scLocator does not distinguishes rows in ListGrid when setAlwaysShowEditors is true

    SmartGWT version : v9.1p_2015-06-28/EVAL Deployment
    Browers: Firefox ESR 24.2.0
    Selenium IDE 2.9.0

    Our project heavily uses smartgwt listGrid in edit mode with below settings.
    Code:
    listGridOrder.setCanEdit( true );
    listGridOrder.setAlwaysShowEditors( true );
    Below is the locator string generated by selenium IDE for "Release Remarks" field of any row when the form is in edit mode. The problem is every time it points to the first row since it does not contain anything to to distinguish the row which is being edited.
    Code:
    scLocator=//ListGrid[ID="bwhOrderTblEdit"]/editRowForm/item[name=release_remarks||title=Release%20Remarks%20||value=123||index=8||Class=TextItem]/element
    So even though the intention of the generated script is to enter some text to the "Release Remarks" filed in each and every row it ends up with modifying value in the first row for each use of above locator with selenium "type" command. I went through the smartgwt documentation but couldn't find out anything helpful.

    Am i missing anything or is this a limitation ? Any help advice is highly appreciated.

    Thank you.

    #2
    I'd like to continue/restart this thread because I have the same problem and it doesn't seem solved.

    I'm using user-extensions.js and user-extensions-ide.js from version 12.0p 2018-10-04.

    Steps to reproduce:
    1. Go to https://www.smartclient.com/smartcli...?id=editByCell
    2. In the "Country" column, clear the values "United States" and "China".
    3. Use Selenium IDE and click in any of those empty cells, the locator will always be the same:
      Code:
      scLocator=//testRoot[]/child[Class=ListGrid||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=list]/editRowForm/item[name=countryName||title=Country||index=0||Class=TextItem]/element
      The locator does NOT contain the row's index.
    4. If you click on country name that has not been cleared, you'll get:
      Code:
      scLocator=//testRoot[]/child[Class=ListGrid||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=list]/editRowForm/item[name=countryName||title=Country[B]||value=India[/B]||index=0||Class=TextItem]/element
      There is a "value" key that allows to focus on the appropriate row.
    My screen starts with an editable ListGrid that contains no values. I need to be able to go in a specific cell to enter data.

    As a visual reference, this is what my ListGrid looks like (the editable cells have blue borders): Click image for larger version  Name:	listgrid.png Views:	1 Size:	2.3 KB ID:	255552


    How can I instruct a "editRowForm" locator to use a row index in the ListGrid instead of a "value" ?

    Thanks !

    Comment


      #3
      Are you using alwaysShowEditors:true? Your instructions to reproduce don't indicate this.

      The locator for an editable grid doesn't normally include a row index since, with alwaysShowEditors:false, there can only be one editable row. To move editing to a particular row, record a click there.

      Comment

      Working...
      X