Недавно я столкнулся со странной проблемой. Я использую WebDriver для автоматизации тестирования веб-приложения GWT. (Это проект Maven 3) Я выполняю тесты только для браузера Firefox. Все работает нормально, пока я использую Firefox 3.6
Проблемы начинаются всякий раз, когда я пытаюсь запустить тесты с более новой версией Firefox, начиная с FF4 до FF8. Всякий раз, когда я запускаю свои тесты, все, что я получаю, это исключение элемента не найдено для всего, что я пытаюсь найти, щелкнуть, прочитать и т. Д.
Любой вид поиска с использованием различных видов локаторов (идентификатор, имя класса, имя) приводит к:
org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"SOME_ID"}; duration or timeout: 31 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
...
Driver info: driver.version: RemoteWebDriver
Более того, это происходит только с моим приложением, потому что, когда я написал быстрый тест, который идет на google.com и ищет некоторые вещи, все работало хорошо.
Кто-нибудь сталкивался с подобной проблемой? Что-то не так с моим веб-приложением? Может, мне стоит что-то изменить? Я просто не знаю что и где? Может быть, нужен какой-нибудь профиль приложения gwt для более позднего Firefox?
Если это поможет, вот мой файл POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>WebTests</groupId>
<artifactId>WebTests</artifactId>
<version>1.0</version>
<!--START:repositories -->
<repositories>
<repository>
<id>selenium-repository</id>
<url>http://selenium.googlecode.com/svn/repository/</url>
</repository>
</repositories>
<!--END:repositories -->
<!--START:dependencies -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-parent</artifactId>
<version>2.13.0</version>
<type>POM</type>
</dependency>
<dependency>
<groupId>org.concordion</groupId>
<artifactId>concordion</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>org.concordion</groupId>
<artifactId>concordion-extensions</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
<!--END:dependencies -->