pom.xml looks like
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
<logOutput>true</logOutput>
<browserSessionReuse>true</browserSessionReuse>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
JUnit TestCase
@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://www.google.co.in/");
selenium.start();
}
@Test
public void testUntitled() throws Exception {
selenium.open("/");
selenium.type("q", "Selenium Sucks");
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
I get this error message when fulfilling the mvn integration-test target . I have a simple test file that opens a Firefox browser and searches for sometext in the Googe search bar.
At the moment, I have also reinstalled the Firefox browser, but it does not work again.
: java.lang.RuntimeException: Selenium: : C:\DOCUME ~ 1\ADMINI ~ 1\LOCALS ~ 1\Temp\customProfileDirb66b3e06cba84cc1b55eb72a418a5c61\parent.lock at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89) org.argus.selenium.timepass.TestSelenium.setUp(TestSelenium.java:16)
- mvn.