Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-49841

Going to configure page is not checking that we actually are on the configure page

XMLWordPrintable

    • 1.60

      package org.jenkinsci.test.acceptance.po;
      
      [...]
      
      public abstract class ConfigurablePageObject extends PageObject {
      
      [... ]
      
      /**
       * Open configuration page if not yet opened.
       *
       * @see #getConfigUrl()
       */
      public void configure() {
          if (driver.getCurrentUrl().equals(getConfigUrl().toExternalForm())) {
              return;
          }
          visit(getConfigUrl());
          elasticSleep(1000); // configure page requires some time to load
      }
      

      This method is going to the config page but is not checking that we actually land on this page. In case of redirection it would not catch any problem even if we are not on the configure page.

      Second point is that we are using an implicit wait, we should better use an explicit wait to check the presence of an element in the page to know if it's loaded or not.

            rverduci Romain Verduci
            rverduci Romain Verduci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: