Announcement

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

    Click event in TreeGrid

    I'm trying to automate a web site created with Smart GWT.
    It's not possible to perform click on automate process, so my solution is replicate the click event by trigger eventproxy using javascript command.

    Some cases, I managed to replicate the click:
    - Elements with AutoIDClass = IButton, I used the click method of eventproxy, e.g: isc_IButton_0.click()
    - Elements with AutoIDClass = Tab, I used the selectTab method of eventproxy, e.g: isc_Tab_5.selectTab()

    My question is how can I replicate the click in submenus elements (TreeGrid).
    For example, in Smart GWT Showcase (http://www.smartclient.com/smartgwt/...d_complete_app ), in show example, how can I select a submenu of categories with javascript command?
    I'm testing in browser's console.

    Thank you

    #2
    This is not an approach that will work for testing. see the Automated Testing overview in the special "docs" package in the SmartGWT JavaDoc.

    Comment


      #3
      Thank you for reply.
      I'm not testing,. I'm trying to automate and click event isn't trigger, that's why I'm looking for javascript commands.
      I look to javadoc page about Automated Testing, but it didn't help with my problem.

      I already can open/ close a folder (in menu) with follow methods: openFolder, closeFolder, toggleFolder with a record like argument. e.g: isc_CategoryTreeGrid_0.openFolder(isc_CategoryTreeGrid_0.getRecord(4))
      It's the best approach?
      This allow me to open/close a folder in menu, but not display the folder's content? How can I select a folder to view the content?

      Thank you

      Comment


        #4
        We're not sure what you mean by "automate" if you don't mean automated testing. If you want to call a function you have attached to a UI interaction, then you should simply call the function directly. There is no need to simulate the UI interaction since you can just call your function directly.

        If you instead want to simulate user action, use Selenium as indicated in the Automated Testing overview.

        If your use case is somehow neither of these, please explain it in depth.

        As far as openFolder() in particular, this will in fact display the children of the folder.

        Comment


          #5
          OK, thank you.. So what function should I call to view/ display folders content and which arguments should I use (if apply)?

          Thank you
          Last edited by jrebelo; 21 Jul 2017, 01:51.

          Comment


            #6
            Again, openFolder() does in fact open a folder and cause its children to be displayed.

            If it's not working for you, check for basic errors such as the folder not actually having any children.

            Comment

            Working...
            X