Sagar Khalasi
2015-01-07 10:04:31 UTC
I have one project which is based on maven.It is run correctly in local
machine with "mvn clean install exec:java" command.
Pom.xml for run maven project.
<groupId>AutomationMaven</groupId><artifactId>AutomationMaven</artifactId><version>0.0.1-SNAPSHOT</version><packaging>jar</packaging>
<name>AutomationMaven</name><url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.43.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.43.1</version>
</dependency></dependencies><build><pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<executable>${env.JAVA_HOME}/bin/javac</executable>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>com.mainClass</mainClass>
</configuration>
</plugin>
</plugins></pluginManagement></build>
I have already set up "GIT repository" for it which is align with "Jenkins Job".
I have made on job in "Jenkins" with this parameter
- JDK 7
- Xvfb setup(Need More Info about configuration)
- maven command = mvn clean install exec:java
I have different server for Run Maven Project (Selenium Test).
I have getting following Track trace (Error) while run project on Server :
org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"mcHeaderLink"}
Command duration or timeout: 30.03 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.43.1', revision:
'5163bceef1bc36d43f3dc0b83c88998168a363a0', time: '2014-09-10 09:43:55'
System info: host: 'ip-10-120-0-202', ip: '10.120.0.202', os.name:
'Linux', os.arch: 'amd64', os.version: '3.2.0-58-virtual', java.version:
'1.7.0_72'
Session ID: 6c37455f-1dbe-4a8f-acd4-a2b21ae6ec00
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true,
javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true,
browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true,
webStorageEnabled=true, nativeEvents=false, rotatable=false,
locationContextEnabled=true, applicationCacheEnabled=true,
takesScreenshot=true, version=26.0}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at
org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)
at org.openqa.selenium.By$ById.findElement(By.java:214)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at
org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:59)
at
org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:37)
at com.sun.proxy.$Proxy22.click(Unknown Source)
machine with "mvn clean install exec:java" command.
Pom.xml for run maven project.
<groupId>AutomationMaven</groupId><artifactId>AutomationMaven</artifactId><version>0.0.1-SNAPSHOT</version><packaging>jar</packaging>
<name>AutomationMaven</name><url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.43.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.43.1</version>
</dependency></dependencies><build><pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<executable>${env.JAVA_HOME}/bin/javac</executable>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<mainClass>com.mainClass</mainClass>
</configuration>
</plugin>
</plugins></pluginManagement></build>
I have already set up "GIT repository" for it which is align with "Jenkins Job".
I have made on job in "Jenkins" with this parameter
- JDK 7
- Xvfb setup(Need More Info about configuration)
- maven command = mvn clean install exec:java
I have different server for Run Maven Project (Selenium Test).
I have getting following Track trace (Error) while run project on Server :
org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"mcHeaderLink"}
Command duration or timeout: 30.03 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.43.1', revision:
'5163bceef1bc36d43f3dc0b83c88998168a363a0', time: '2014-09-10 09:43:55'
System info: host: 'ip-10-120-0-202', ip: '10.120.0.202', os.name:
'Linux', os.arch: 'amd64', os.version: '3.2.0-58-virtual', java.version:
'1.7.0_72'
Session ID: 6c37455f-1dbe-4a8f-acd4-a2b21ae6ec00
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{platform=LINUX, acceptSslCerts=true,
javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true,
browserName=firefox, handlesAlerts=true, browserConnectionEnabled=true,
webStorageEnabled=true, nativeEvents=false, rotatable=false,
locationContextEnabled=true, applicationCacheEnabled=true,
takesScreenshot=true, version=26.0}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at
org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
at
org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)
at org.openqa.selenium.By$ById.findElement(By.java:214)
at
org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
at
org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:59)
at
org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:37)
at com.sun.proxy.$Proxy22.click(Unknown Source)
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+***@googlegroups.com.
To post to this group, send email to testng-***@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+***@googlegroups.com.
To post to this group, send email to testng-***@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.