Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902956 A legacy JT GUI Automation
  3. CODETOOLS-7903571

Feature Tests - Modified/Updated the 'ReportCreate.java' and 'Tools.java''

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      Modified/Updated the below two files as per the latest JT:
      I. ReportCreate/ReportCreate.java
      II. jthtest/Tools.java

      I - Reason for modifying - "ReportCreate/ReportCreate.java":-

      1.
      - if (!browser.getText().contains("name=\"Configuration and Other Settings\"")) {
      + if (!browser.getText().replaceAll("[^a-zA-Z]", " ").trim().replaceAll(" +", " ").contains("Configuration and Other Settings")) {
                           error.append("report doesn't contain configuration block\n");
                       }
      ----------------------------------------------------------------------
      Special characters/extra space are getting appended while fetching the text from latest JavaTest html report creation page using "browser.getText()".
      For example: '#' is appended to "Configuration and Other Settings" text. To remove the special characters modified the above line.

      2.
      - if (!browser.getText().contains("name=locations") && !browser.getText().contains("name=\"locations\"")) {
      + if (!browser.getText().contains("name=locations") && !browser.getText().contains("id=\"locations\"")) {
                           error.append("report doesn't contain 'Where to put the results' block\n");
                       }
      ----------------------------------------------------------------------
      HTML attribute names/values are changed in JavaTest report creation page.
      For example: "name=\"locations\"" is changed to "id=\"locations\"".

      3.
      - browser.clickUrl(u);
      - browser.waitForPageLoading("</html>", "Directory listing for html");
      ----------------------------------------------------------------------
      Removed these lines as per CODETOOLS-6480602

      II - Reason for modifying - "jthtest/Tools.java":-
      1.
      - //String tmp=in[i].replaceAll("\\W"," ");
      - //String acin=tmp.replaceAll("\\d","");
      - if (in[i].equals(what)) {
      + if (in[i].replaceAll("[^#/.^a-zA-Z ]+"," ").trim().equals(what)) {
      ----------------------------------------------------------------------
      Special characters/extra space are getting appended while fetching the text from javatest html report creation page using "browser.getText()". To remove the special characters modified the above line.

      ----------------------------------------------------------------------

            gyadav Golla Yadav
            gyadav Golla Yadav
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: