Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-16611

UserProfileTest flickers in the setup

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      org.openqa.selenium.StaleElementReferenceException: 
      Element not found in the cache - perhaps the page has changed since it was looked up
      Command duration or timeout: 10.58 seconds
      For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html
      Build info: version: '2.44.0', revision: '76d78cf323ce037c5f92db6c1bba601c2ac43ad8', time: '2014-10-23 13:11:40'
      System info: host: 'localhost', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.40-vs2.3.6.8-beng', java.version: '1.8.0_121'
      Driver info: org.openqa.selenium.firefox.FirefoxDriver
      Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=32.0.1, platform=LINUX, nativeEvents=true, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
      Session ID: 19852b52-64e7-491c-a805-df6458bb3d1b
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
      	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
      	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
      	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:268)
      	at org.openqa.selenium.remote.RemoteWebElement.click(RemoteWebElement.java:79)
      	at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:50)
      	at com.sun.proxy.$Proxy38.click(Unknown Source)
      	at org.xwiki.test.ui.po.editor.EditPage.clickCancel(EditPage.java:226)
      	at org.xwiki.user.test.ui.UserProfileTest.setUp(UserProfileTest.java:97)
      

      Problem has been discussed at https://matrix.to/#/!ikPtGZaGWtyblizzlR:matrix.xwiki.com/$15641265209352RrOmE:matrix.xwiki.com?via=matrix.org&via=matrix.xwiki.com&via=matrix.wina.be

      The following line needs to be removed now that we have auto merge:

              // The first edition of the profile might introduce new objects: those might lead to a conflict window
              // if the edit is performed too quickly (the version needs to be refreshed). To avoid this, we edit and cancel
              // the edition, so the objects are created and we don't have any conflict in the further editions.
              this.customProfilePage.editProfile().clickCancel();
      

      BTW this comment could be improved by:

          // When editing a user profile page the first time, a UserDashboardPreferencesClass xobject is added and
          // the page is saved (while still being in edit mode, so that even if the user clicks cancel the xobject will
          // have been added). This is so that if the user wants to change his dashboard setttings, the save will work
          // (by default the save won't work if the xobjects on which it needs to save some xproperties doesn't exist).
          // This save will generate a new revision and thus trigger the conflict window.
      

      surli said he'll work on it.

      Attachments

        Activity

          People

            surli Simon Urli
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: