Uploaded image for project: 'QA Framework'
  1. QA Framework
  2. RATEST-165

Fix Failing WebElement for PhoneNumber in Page class

    XMLWordPrintable

Details

    • Low

    Description

      This is a bug https://github.com/openmrs/openmrs-contrib-uitestframework/blob/master/src/main/java/org/openmrs/uitestframework/page/Page.java#L365

       The error message that is being returned on the registration Page after inputting the non integer value  forexample "aaaaa" has a bug in the page class, The quick is to correct the webelement in for loop by changing     (WebElement webElement : driver.findElements(By.className("error")))    to  f(WebElement webElement : driver.findElements(By.className("field-error")))  which is the exact element being used after inspection 

      Steps to Reproduce this bug
      1. Login into https://qa-refapp.openmrs.org/openmrs/login.htm
      2. Register any patient
      3. With in Phone Number Text area, Enter "aaaaaaaaa", then
      4.Press continue button
      5. The server doesnot allow "aaaaaaaa" but rather allows integers so an error message pops up* Must be a valid phone number (with +, -, numbers or parentheses)*.
      5. Try to inspect this error message and confirm the element being used as field-errors, Then compare with what is element being used in https://github.com/openmrs/openmrs-contrib-uitestframework/blob/master/src/main/java/org/openmrs/uitestframework/page/Page.java#L365

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                sharif Sharif Magembe
                sharif Sharif Magembe
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: