Перейти к содержимому

PetrRomanov2

Регистрация: 29 авг 2017
Offline Активность: 13 сен 2017 07:59
-----

Мои темы

Selenide: Проблемы с кодировкой

29 августа 2017 - 14:48

Добрый день! 

Для тестирования UI используем selenide 4.5.1. Он прекрасно справляется со своей задачей. 

 

На виртуальной машине CentOS7, с помощью докеров развернута система: 
- Сервер для сборки: jenkins/jenkins:latest 
- Селениум: selenium/hub:3.4.0
Ноды для запуска тестов на chrome и firefox
- selenium/node-firefox
- selenium/node-chrome

 

Но возникла проблема, что selenium 3.4 не поддерживает работу actions, а конкретно mouseMove в браузере firefox.
 

Обновили версию selenium до  3.5.1, в которой был исправленн данный баг.

 

Локально тесты стали отрабатывать без ошибок.

Но на поднятом selenium-grid 3.5.0 в браузерах при вводе русского текста стали отображаться знаки вопроса, а также не находить эелементы с использованием русского текста

Пример: private SelenideElement registration = $(byText("Регистрация"));

 
После обновления из GitHub последних свежих образов версий 3.5.0-argon
- Сервер для сборки: jenkins/jenkins:latest
- Селениум: selenium/hub:3.5.0-argon
Ноды для запуска тестов на chrome и firefox
- selenium/node-firefox:3.5.0-argon
- selenium/node-chrome:3.5.0-argon
 
Просьба помочь разобраться с данной проблемой
 
 
 
<properties>
        <java.version>1.8</java.version>
        <selenide.version>4.5.1</selenide.version>
        <selenium.version>3.5.1</selenium.version>
        <testng.version>6.10</testng.version>
        <allure.version>1.5.4</allure.version>
        <aspectj.version>1.8.10</aspectj.version>
        <maven-surefire-plugin>2.20</maven-surefire-plugin>
        <maven-compiler-plugin>3.6.2</maven-compiler-plugin>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <guava.version>22.0</guava.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.codeborne</groupId>
            <artifactId>selenide</artifactId>
            <version>${selenide.version}</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>${selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.github.bonigarcia</groupId>
            <artifactId>webdrivermanager</artifactId>
            <version>1.7.1</version>
        </dependency>
        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-testng-adaptor</artifactId>
            <version>${allure.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19</version>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                    <suiteXmlFiles>
                        <file>src/test/resources/suites/SecondTestSuite.xml</file>
                    </suiteXmlFiles>
                    <properties>
                        <property>
                            <name>testnames</name>
                            <value>${testnames}</value>
                        </property>
                    </properties>
                    <argLine>
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                    </argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>