http://www.java2s.com/Code/Jar/a/Downloadapacheant182jar.htm
[quote:vs3d988h]Please provide me code for module 21 Release Year : 2016. It will help me to understand module 21.
[/quote:vs3d988h]
module 21 is not complete. wait 10 days.
I have apache-ant-1.9.6-bin.zip . What I meant is we need few Jars to compile project using ANT.
Can you please share those jars with me?
Thanks,
Sumanta
which other jars? which classes are you using? there are thousands of jars in java.
I was looking your below video where you are explained about ANT and jars . Also please find attached screenshot where you have shown ANT Jar files for all frameworks. Let me know if still you need more info.
Selenium Videos - Module 21
Release Year : 2016
Part 11
I dont have extentreports.jar. Thats why I have requested you for all jars under your newjar folder.
I am getting below error while compiling.
[echo] classpath------: D:\Selenium\Selenium_Pack\Selenium_Pack\jars\SaxonLiaison.jar:D:\Selenium\Selenium_Pack\Selenium_Pack\jars\commons-beanutils-1.8.0.jar:D:\Selenium\Selenium_Pack\Seleni
enium_Pack\jars\saxon-8.7.jar:D:\Selenium\Selenium_Pack\Selenium_Pack\jars\selenium-java-client-driver-sources.jar:D:\Selenium\Selenium_Pack\Selenium_Pack\jars\selenium-java-client-driver-test
[echo] compiling...
[javac] D:\workspace\Core_Hybrid_Framework\build.xml:67: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 13 source files to D:\workspace\Core_Hybrid_Framework\build
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.8 in JDK 1.8.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your build file.
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\AppKeywords.java:7: error: package com.relevantcodes.extentreports does not exist
[javac] import com.relevantcodes.extentreports.ExtentTest;
[javac] ^
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\GenericKeywords.java:23: error: package com.relevantcodes.extentreports does not exist
[javac] import com.relevantcodes.extentreports.ExtentTest;
[javac] ^
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\GenericKeywords.java:24: error: package com.relevantcodes.extentreports does not exist
[javac] import com.relevantcodes.extentreports.LogStatus;
[javac] ^
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\AppKeywords.java:15: error: cannot find symbol
[javac] public AppKeywords(ExtentTest test) throws IOException {
[javac] ^
[javac] symbol: class ExtentTest
[javac] location: class AppKeywords
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\GenericKeywords.java:30: error: cannot find symbol
[javac] ExtentTest test;
[javac] ^
[javac] symbol: class ExtentTest
[javac] location: class GenericKeywords
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\GenericKeywords.java:32: error: cannot find symbol
[javac] public GenericKeywords(ExtentTest test) throws IOException{
[javac] ^
[javac] symbol: class ExtentTest
[javac] location: class GenericKeywords
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\Keywords.java:10: error: package com.relevantcodes.extentreports does not exist
[javac] import com.relevantcodes.extentreports.ExtentTest;
[javac] ^
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\Keywords.java:11: error: package com.relevantcodes.extentreports does not exist
[javac] import com.relevantcodes.extentreports.LogStatus;
[javac] ^
[javac] D:\workspace\Core_Hybrid_Framework\src\main\java\com\qtpselenium\core\hybrid\Keywords.java:15: error: cannot find symbol
download extent report from here.
https://drive.google.com/file/d/0ByJmgAhaLx0GdU9KaTNnWEsyUTA/view
It seems you have not explained "Email Test Report" in Module 21. Its OKAY.
Can you tell me which videos you have explained Email test report?
I am getting " [testng] Couldn't instantiate class:class com.qtpselenium.core.hybrid.testcases.GmailLogin" When I executed ant run .
Can you please share me correct build.xml file or can you guide me how can I fix this.
D:\workspace\Core_Hybrid_Framework>ant run
Buildfile: D:\workspace\Core_Hybrid_Framework\build.xml
setClassPath:
init:
clean:
[delete] Deleting directory D:\workspace\Core_Hybrid_Framework\build
compile:
[echo] making directory...
[mkdir] Created dir: D:\workspace\Core_Hybrid_Framework\build
[echo] classpath------: D:\Selenium\Selenium_Pack\Selenium_Pack\jars\SaxonLiaison.jar:D:\Selenium\Selenium_Pack\Selenium_Pack\jars\commons-beanutils-1.8.0.jar:D:\Selenium\Selenium_
nium_Pack\jars\poi-ooxml-schemas-3.6-20091214.jar:D:\Selenium\Selenium_Pack\Selenium_Pack\jars\saxon-8.7.jar:D:\Selenium\Selenium_Pack\Selenium_Pack\jars\selenium-java-2.53.0.jar:D:\Sel
r
[echo] compiling...
[javac] D:\workspace\Core_Hybrid_Framework\build.xml:67: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 14 source files to D:\workspace\Core_Hybrid_Framework\build
[javac]
[javac] WARNING
[javac]
[javac] The -source switch defaults to 1.8 in JDK 1.8.
[javac] If you specify -target 1.5 you now must also specify -source 1.5.
[javac] Ant will implicitly add -source 1.5 for you. Please change your build file.
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
[javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings
[copy] Copying 5 files to D:\workspace\Core_Hybrid_Framework\build
[copy] Copied 19 empty directories to 17 empty directories under D:\workspace\Core_Hybrid_Framework\build
run:
[testng] [TestNG] [ERROR]
[testng] Couldn't instantiate class:class com.qtpselenium.core.hybrid.testcases.GmailLogin
[testng] The tests failed.
BUILD SUCCESSFUL
Total time: 1 second
D:\workspace\Core_Hybrid_Framework>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE project [
]>
<project name="Learning TestNG" default="usage" basedir=".">
<!-- ========== Initialize Properties =================================== -->
<property environment="env"/>
<property name="ws.home" value="${basedir}"/>
<property name="ws.jars" value="D:\Selenium\Selenium_Pack\Selenium_Pack\jars"/>
<property name="test.dest" value="${ws.home}/build"/>
<property name="test.src" value="${ws.home}/src"/>
<property name="ng.result" value="test-output"/>
<!--target name="start-selenium-server">
<java jar="${ws.home}/lib/selenium-server.jar"/>
</target-->
<target name="setClassPath" unless="test.classpath">
<path id="classpath_jars">
<fileset dir="${ws.jars}" includes="*.jar"/>
</path>
<pathconvert pathsep=":"
property="test.classpath"
refid="classpath_jars"/>
</target>
<target name="init" depends="setClassPath">
<tstamp>
<format property="start.time" pattern="MM/dd/yyyy hh:mm aa" />
</tstamp>
<condition property="ANT"
value="${env.ANT_HOME}/bin/ant.bat"
else="${env.ANT_HOME}/bin/ant">
<os family="windows" />
</condition>
<taskdef name="testng" classpath="${test.classpath}"
classname="org.testng.TestNGAntTask" />
</target>
<!-- all -->
<target name="all">
</target>
<!-- clean -->
<target name="clean">
<delete dir="${test.dest}"/>
</target>
<!-- compile -->
<!-- compile -->
<target name="compile" depends="init, clean" >
<delete includeemptydirs="true" quiet="true">
<fileset dir="${test.dest}" includes="**/*"/>
</delete>
<echo message="making directory..."/>
<mkdir dir="${test.dest}"/>
<echo message="classpath------: ${test.classpath}"/>
<echo message="compiling..."/>
<javac
debug="true"
destdir="${test.dest}"
srcdir="${test.src}"
target="1.5"
classpath="${test.classpath}"
>
</javac>
<copy todir="${test.dest}">
<fileset dir="${test.src}" excludes="**/*.java"/>
</copy>
</target>
<!-- build -->
<target name="build" depends="init">
</target>
<!-- run -->
<target name="run" depends="compile">
<testng classpath="${test.classpath}:${test.dest}" suitename="suite1">
<xmlfileset dir="${ws.home}" includes="src/test/resources/testng.xml"/>
</testng>
<!--
<testng classpath="${test.classpath}:${test.dest}" groups="fast">
<classfileset dir="${test.dest}" includes="example1/*.class"/>
</testng>
-->
</target>
<target name="usage">
<echo>
ant run will execute the test
</echo>
</target>
<path id="test.c">
<fileset dir="${ws.jars}" includes="*.jar"/>
</path>
<target name="email" >
<java classname="com.qtpselenium.core.hybrid.testcases.GmailLogin" classpath="${test.dest}" classpathref="test.c" />
</target>
<target name="makexsltreports">
<mkdir dir="${ws.home}/XSLT_Reports/output"/>
<xslt in="${ng.result}/testng-results.xml" style="src/com/qtpselenium/xslt/testng-results.xsl"
out="${ws.home}/XSLT_Reports/output/index.html" classpathref="test.c" processor="SaxonLiaison">
<param name="testNgXslt.outputDir" expression="${ws.home}/XSLT_Reports/output/"/>
<param name="testNgXslt.showRuntimeTotals" expression="true"/>
</xslt>
</target>
<!-- ****************** targets not used ****************** -->
</project>
Any update on this. Please note we have discussed over Skype and shared project. ANY UPDATE on this ?
try this
On your Eclipse IDE, go into Window > Preferences > Java > Installed JREs > and check your installed JREs. You should have an entry with a JDK there.
Select the Execution Env as show below. Click OK
Then Right-Click on your Project -> Maven -> Update Project
http://i.stack.imgur.com/yBB7s.png
try this also after that.
http://stackoverflow.com/questions/20345451/maven-compilation-error-package-org-testng-annotations-does-not-exist