Arek
Arek

Reputation: 2021

WebDriver can't run tests on Firefox 4 and higher

Recently I am facing a strange problem. I am using WebDriver for test automation for GWT web application. (It's Maven 3 project) I am performing tests only for Firefox browser. Everything works fine as long as I use Firefox 3.6

Problems start whenever I try to run tests with newer version of Firefox starting from FF4 to FF8. Whenever i run my tests all I get is element not found exception for everything I try to locate, click, read etc. Any kind of searching using different kinds of locators (id, classname, name) results in:

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

What is more it happens just with my application because when I wrote a quick test that goes to google.com and searches for some stuff everything worked well.

Has anyone faced similar problem? Is there something wrong with my webapp? Maybe I should change something somewhere? I just don't know what and where? Maybe some gwt app profile is needed for newer firefox? If it is any help here's my POM file:

 <?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 -->

Upvotes: 1

Views: 481

Answers (4)

Arek
Arek

Reputation: 2021

I tried again a little bit different approach. Yet still it is the same, page gets launched just fine and whenever i try to locate any element it fails with nosuchelementexception. It is the same on Firefox 4.0 and higher and also the same on IE 7,8.

Well I guess that I'll just go back to 3.6 and live with it :)

Upvotes: 0

Bohemian
Bohemian

Reputation: 425073

We had the same problem in our project, also using Maven etc as you are.

I tried several Firefox versions, but it seems even the latest version of selenium does not support Firefox beyond version 3.x

We just installed version 3.x on our integration server and we live with it.

Upvotes: 1

Rostislav Matl
Rostislav Matl

Reputation: 4543

I would recommend to update to newer Selenium - because of tight browser integration WebDriver is sensitive to changes in ABI.

Upvotes: 0

Adel Boutros
Adel Boutros

Reputation: 10285

When you update firefox, maybe there was a change in names of functions or classes which you forgot to change.

Did you try your code on google Chrome?

Upvotes: 0

Related Questions