Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1867

SeleniumTestCase.waitForElementToDisappear(String elementId) does not seem to work

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 5.3.2, 5.4
    • None
    • tapestry-test

    Description

      In TAP5-1492 [1] "New features for SeleniumTestCase" one of the added methods to SeleniumTestCase is waitForElementToDisappear.
      The commit [2] is by Howard on 31 Mar 2011.

      The Prototype hide() documentation [3] briefly says "Hides and returns element".

      I don't see it used in any of the tapestry projects and don't know if anyone has used it before.
      Here is the code:

      protected final void waitForElementToDisappear(String elementId)

      { String condition = String.format("window.$(\"%s\").hide()", elementId); waitForCondition(condition, PAGE_LOAD_TIMEOUT); }

      IMO this method does not what it is supposed to do.

      A Patch is provided just with one minor change

      protected final void waitForElementToDisappear(String elementId)

      { String condition = String.format("window.$(\"%s\") == undefined", elementId); waitForCondition(condition, PAGE_LOAD_TIMEOUT); }

      If there is a better approach please feel free to comment.

      [1] TAP5-1492 https://issues.apache.org/jira/browse/TAP5-1492

      [2] Commit http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry5/test/SeleniumTestCase.java?p2=%2Ftapestry%2Ftapestry5%2Ftrunk%2Ftapestry-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftapestry5%2Ftest%2FSeleniumTestCase.java&p1=%2Ftapestry%2Ftapestry5%2Ftrunk%2Ftapestry-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Ftapestry5%2Ftest%2FSeleniumTestCase.java&r1=1087494&r2=1087493&view=diff&pathrev=1087494

      [3] Prototype hide() function http://prototypejs.org/api/element/hide

      Attachments

        1. TAP5-1867.patch
          0.6 kB
          Dragan Sahpaski

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            dragan.sahpaski Dragan Sahpaski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment