Announcement

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

    selenium does not click on the header dropdown icon in table

    try this example
    http://www.smartclient.com/docs/7.0rc2/a/system/reference/SmartClient_Explorer.html#cellClicks

    click the drop down icon on country column and click sort Ascending.

    but during playback, selenium does not click on the drop down icon at all.

    i am using the latest build.

    #2
    recorded scripts

    Code:
    selenium.open("/isomorphic/system/reference/SmartClient_Explorer.html#cellClicks");
    selenium.click("scLocator=//ListGrid[ID=\"countryList\"]/headerMenuButton/");
    selenium.click("scLocator=//ListGrid[ID=\"countryList\"]/headerContextMenu[Class=Menu||index=0||length=1||classIndex=0||classLength=1||roleIndex=0||roleLength=1||scRole=menu]/body/row[title=Sort%20Ascending||0]/col[fieldName=keys||2]");

    Comment


      #3
      The menu appears on mouseOver so it's not visible when the click occurs. Options are to fire a mouseover yourself, or fire a context click instead of the click (which is another way of triggering the menu).

      Comment


        #4
        This is what worked for me using Isomorphic driver 4.1.0 with Firefox 26.0

        scLocator = "//DynamicForm[ID='LocatableDynamicForm_addPatientDetailseditPatientDetails1_personalDetailsEpersonalDetailsEperson1Detailsperson1Details2_4_EDIT_form']/item[name=refData]/"

        selenium.click( ByScLocator.scLocator(scLocator + "[icon='picker']") )

        //Press cursor down key
        selenium.keyPress( ByScLocator.scLocator(scLocator +"/pickList/body/"), 40)

        selenium.waitForElementClickable( ByScLocator.scLocator(scLocator +"/pickList/body/"))

        //For some reason, only a carriage return string will simulate a return
        selenium.keyPress( ByScLocator.scLocator(scLocator +"/pickList/body/"), "\n")

        Hope this helps someone else

        Regards
        Darragh Sherwin
        darragh.sherwin@infocarehealth.com

        Comment


          #5
          selenium hangs

          Hi

          I have similar problem with Selenium - replaying recorded process hangs before opening the context menu of the grid.

          Important version details:

          * Selenium IDE 2.9.0
          * SGWT extensions (user-extensions.js, user-extensions-ide.js) for Selenium IDE come from SmartGWT 5.0pro (Build 2015-07-29)
          * GWT 2.6.1.

          I've recorded the simple process of discovering column 'Manager' of this showcase grid: http://www.smartclient.com/smartgwte...rable_ListGrid

          Whole recording is included in the attachment.
          Attached Files
          Last edited by j.zakrzewski; 30 Jul 2015, 07:03.

          Comment


            #6
            The issue here is that the mouseMove operation that shows the HeaderMenuButton isn't automatically recorded for you, so the script times out waiting for the HeaderMenuButton to appear so it can click on it.

            To avoid this problem, we recommend using the right click (or "context menu" operation) to open the top-level menu. So in your case, right click over a header button to record opening the initial menu, and then click on the appropriate menu item to record opening the submenu. (Note: the submenu will already be showing due your mouse movements, but to record it for playback you need to go ahead and click on the appropriate menu item.) After that, your final click on the nested menu to show/hide the ListGrid field should work properly during replay.

            For the more general case, we also plan to add support for a special key sequence to insert a mouseMove over the current element. However, that approach isn't required here.
            Last edited by Isomorphic; 4 Aug 2015, 13:13.

            Comment


              #7
              Thanks, this workaround works and it's good enough for our test cases.

              Comment

              Working...
              X