Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-88

pageobjects.Form#clickButton does not work on some forms

XMLWordPrintable

      Form#clickButton(java.lang.String) does not work on e.g. the "Verify setup" tab of the "Mail tools" app:

       

      @Test
      void detectMailForm(PageObjects expect){
          // GIVEN
          expect.findBar().openApp("Mail tools");
      
          // THEN
          expect.form(Form.detectTab("Mail"))
              .openTab("Verify setup")
              .clickButton("Send test mail");
      } 

      Throws an exception:

      org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"..//span[text() = 'Send test mail']/parent::*/parent::*[@role='button']"}
        (Session info: chrome=84.0.4147.105)
      For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
      Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
      System info: host: 'Michaels-MBP.fritz.box', ip: 'fe80:0:0:0:4d6:7d82:1ef3:750f%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '12.0.2'
      Driver info: org.openqa.selenium.remote.RemoteWebDriver
      Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 84.0.4147.105, chrome: {chromedriverVersion: 84.0.4147.30 (48b3e868b4cc0..., userDataDir: /tmp/.com.google.Chrome.YqXQVv}, goog:chromeOptions: {debuggerAddress: localhost:44843}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:virtualAuthenticators: true, webdriver.remote.sessionid: c903de6e75b31bbcc62229b68c9...}
      Session ID: c903de6e75b31bbcc62229b68c97beae
      *** Element info: {Using=xpath, value=..//span[text() = 'Send test mail']/parent::*/parent::*[@role='button']}	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
      	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
      	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
      	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
      	at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
      	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
      	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
      	at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:285)
      	at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:185)
      	at org.openqa.selenium.remote.RemoteWebElement.findElementByXPath(RemoteWebElement.java:261)
      	at org.openqa.selenium.By$ByXPath.findElement(By.java:353)
      	at org.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:181)
      	at info.magnolia.test.selenium.pageobjects.Button.findByLabel(Button.java:61)
      	at info.magnolia.test.selenium.pageobjects.Form.clickButton(Form.java:181)
       

        Acceptance criteria

              rdhar Rishab Dhar
              mduerig Michael Duerig
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD