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.
----------------------------------------------------------------------
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.
----------------------------------------------------------------------
- clones
-
CODETOOLS-7903563 Feature Tests - Adding five JavaTest GUI legacy automated test scripts
- Closed