Announcement

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

    SmartGWT 14.1 SCLocator Difference

    We're migrating from SmartGWT 13.0 to 14.1 (Enterprise 14.1-p20250621). We're noticing a difference in returned SCLocator values for some elements.

    We have this embedded in our app:

    Click image for larger version

Name:	2025-07-22 08_28_09-EAWorkWindow.png
Views:	37
Size:	35.5 KB
ID:	276081

    This copies the SCLocator to the clipboard when pressing Ctrl + Alt + W of whatever is underneath the mouse. With the mouse hovered over a record in a pick list:

    Click image for larger version

Name:	2025-07-22 08_29_19-EAWorkWindow.png
Views:	27
Size:	34.9 KB
ID:	276082

    For SmartGWT 13.0, we get:

    //Window[ID="hardwarePrepPopupWindowId"]/item[0][Class="VLayout"]/member[Class=HLayout||index=0||length=2||classIndex=0||classLength=1]/member[Class=DynamicForm||index=0||length=1||classIndex=0||classLength=1]/item[name=vendor||title=Select%20Manufacturer||index=0||Class=ComboBoxItem]/pickList/body/row[vendor_id=1178||name=American%20Door||4]/col[fieldName=name||1]

    For 14.1, we get:

    //:PickListMenu[dataSource="VendorSQL"]/body/row[vendor_id=162||name=Test1||6]/col[fieldName=name||1]

    Is there a change in the SCLocators? Or is this unintended?

    #2
    Quite intended. We've added a powerful new feature called "search locators" (see "Interior locator segments" here):

    https://smartclient.com/smartclient-...utoTestLocator

    Basically, if an unambiguous locator can be generated via search segments, we'll do that, because the locators are far shorter and more readable.

    In this case, there can only be one PickListMenu active at a time, so it's an ideal time to use search segments, so we do.

    You can turn it off if you like, via the options to getLocator(), like useSearchSegments:false

    https://smartclient.com/smartclient-...SearchSegments

    .. but we don't know of any reason why you'd want to!

    Comment


      #3
      Thank you!

      Comment

      Working...
      X