Skip to content

Commit a54fdbc

Browse files
committed
[master] - implemented smart checked for languages on the page. Update README file
1 parent 48bb036 commit a54fdbc

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.automotion</groupId>
88
<artifactId>automation.framework</artifactId>
9-
<version>1.1.0</version>
9+
<version>1.1.1</version>
1010
<properties>
1111
<!-- github server corresponds to entry in ~/.m2/settings.xml -->
1212
<github.global.server>github</github.global.server>

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This is JAVA library for the running of mobile, web or API automated tests.
1818
<dependency>
1919
<groupId>io.automotion</groupId>
2020
<artifactId>automation.framework</artifactId>
21-
<version>1.1.0</version>
21+
<version>1.1.1</version>
2222
</dependency>
2323

2424
### Steps of adding to the project ###
@@ -41,6 +41,7 @@ This is JAVA library for the running of mobile, web or API automated tests.
4141

4242
### Steps of using during test run ###
4343

44+
#### ! Do not forget to put Chrome driver into Your project src/test/resources/drivers ! ####
4445

4546
- Specify env variables (example):
4647
* For Web local run::

src/main/java/util/validator/LanguageChecker.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ public static boolean isCorrectLanguageOnThePage(WebDriver driver, String lang)
3939
String bodyText = jse.executeScript("return document.body.innerHTML", "").toString();
4040
bodyText = bodyText.replaceAll("<script\\b[^<]*(?:(?!<\\/script>)<[^<]*)*<\\/script>", "");
4141
bodyText = bodyText.replaceAll("<noscript\\b[^<]*(?:(?!<\\/noscript>)<[^<]*)*<\\/noscript>", "");
42+
bodyText = bodyText.replaceAll("<style\\b[^<]*(?:(?!<\\/style>)<[^<]*)*<\\/style>", "");
43+
bodyText = bodyText.replaceAll("<pre\\b[^<]*(?:(?!<\\/pre>)<[^<]*)*<\\/pre>", "");
4244
bodyText = bodyText.replaceAll("<[^>]*>", "");
4345
bodyText = bodyText.toLowerCase().replaceAll("[\\t|\\n|\\r|\\s]+", " ").replaceAll("[\\s]+", " ");
4446

0 commit comments

Comments
 (0)