[jira] [Commented] (TAP5-1867) SeleniumTestCase.waitForElementToDisappear(String elementId) does not seem to work
[ https://issues.apache.org/jira/browse/TAP5-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13986501#comment-13986501 ] Dragan Sahpaski commented on TAP5-1867: --- You're free to close this then. > SeleniumTestCase.waitForElementToDisappear(String elementId) does not seem to > work > -- > > Key: TAP5-1867 > URL: https://issues.apache.org/jira/browse/TAP5-1867 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-test >Affects Versions: 5.3.2, 5.4 >Reporter: Dragan Sahpaski > Labels: patch > Attachments: TAP5-1867.patch > > > 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 -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (TAP5-1867) SeleniumTestCase.waitForElementToDisappear(String elementId) does not seem to work
[ https://issues.apache.org/jira/browse/TAP5-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982294#comment-13982294 ] Jochen Kemnade commented on TAP5-1867: -- SeleniumTestCase.waitForElementToDisappear(String elementId) was deprecated in 5.4, so I'm in favor of removing 5.4 from the affected versions. > SeleniumTestCase.waitForElementToDisappear(String elementId) does not seem to > work > -- > > Key: TAP5-1867 > URL: https://issues.apache.org/jira/browse/TAP5-1867 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-test >Affects Versions: 5.3.2, 5.4 >Reporter: Dragan Sahpaski > Labels: patch > Attachments: TAP5-1867.patch > > > 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 -- This message was sent by Atlassian JIRA (v6.2#6252)