Exception Org.testng.exception

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Exception Org.testng.exception

Sele nium
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
You would need to share the code that is triggering this.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Mon, Aug 19, 2013 at 5:48 PM, Sele nium <[hidden email]> wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
In reply to this post by Sele nium
Hi Krishnan,
 
Here is my problem.
After executing testNG script , I'm getting error stating org.testng.TestNGException: Cannot instantiate class TestNG.DemoTestNG. Can anybody please give me the solution for my problem. 

package TestNG;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

   // public  void main(String[] args) {

// objects and variables instantiation
        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

        
        
        // launch the firefox browser and open the application url
       @Test
        public void Sox_Login() {

        driver.get(appUrl);

// maximize the browser window
        driver.manage().window().maximize();

// declare and initialize the variable to store the expected title of the webpage.
        String expectedTitle = "SOX ADMIN - LOGIN";
       
// fetch the title of the web page and save it into a string variable
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

// compare the expected title of the page with the actual title of the page and print the result
       // if (expectedTitle.equals(actualTitle))
        //{
        //    System.out.println("Verification Successful - The correct title is displayed on the web page.");
        //}
       // else
       // {
          //  System.out.println("Verification Failed - An incorrect title is displayed on the web page.");

       // }
       
// enter a valid username in the email textbox
        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

// enter a valid password in the password textbox
        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

// click on the Sign in button
        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        
// close the web browser
        driver.close();
        System.out.println("Test script executed successfully.");

// terminate the program
        System.exit(0);
    }
}


        

        






--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

walter.kelt
In reply to this post by Sele nium
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
Thanks for help Krishnan,

Now i am able to execue TestNG script but the result windows are not displaying output in proper fashion

Console should display result in this manner                                         But displaying in this way
 Selenium TestNG tutorial 18                       Inline image 1

Expected TestNG Result window                                                           Actual TestNG Result window what I am getting

Selenium TestNG tutorial 19          Inline image 2


Did i make any changes to get the desired result window..

Thanks..

















On Wed, Oct 28, 2015 at 11:50 AM, Krishnan Mahadevan <[hidden email]> wrote:
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
Get rid of the call to "System.exit(0);" and try again. You are not supposed to be triggering an exit call to the JVM. 
After TestNG runs the test, it still triggers a few listener calls which are responsible for showing test results.

But since you are killing the JVM with that System.exit() call, I am guessing TestNG never manages to get any of that done.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:16 PM, Umesh Nand <[hidden email]> wrote:
Thanks for help Krishnan,

Now i am able to execue TestNG script but the result windows are not displaying output in proper fashion

Console should display result in this manner                                         But displaying in this way
 Selenium TestNG tutorial 18                       Inline image 1

Expected TestNG Result window                                                           Actual TestNG Result window what I am getting

Selenium TestNG tutorial 19          Inline image 2


Did i make any changes to get the desired result window..

Thanks..

















On Wed, Oct 28, 2015 at 11:50 AM, Krishnan Mahadevan <[hidden email]> wrote:
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
Now this is what i got after making changes suggested by you:

Inline image 1Inline image 3

Everything is working fine and its generating the html report also.

Now can i say that the basic TestNG set up is ready to use..?

On Wed, Oct 28, 2015 at 5:20 PM, Krishnan Mahadevan <[hidden email]> wrote:
Get rid of the call to "System.exit(0);" and try again. You are not supposed to be triggering an exit call to the JVM. 
After TestNG runs the test, it still triggers a few listener calls which are responsible for showing test results.

But since you are killing the JVM with that System.exit() call, I am guessing TestNG never manages to get any of that done.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:16 PM, Umesh Nand <[hidden email]> wrote:
Thanks for help Krishnan,

Now i am able to execue TestNG script but the result windows are not displaying output in proper fashion

Console should display result in this manner                                         But displaying in this way
 Selenium TestNG tutorial 18                       Inline image 1

Expected TestNG Result window                                                           Actual TestNG Result window what I am getting

Selenium TestNG tutorial 19          Inline image 2


Did i make any changes to get the desired result window..

Thanks..

















On Wed, Oct 28, 2015 at 11:50 AM, Krishnan Mahadevan <[hidden email]> wrote:
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
Yep. You are good to start exploring TestNG ! Have fun :)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:45 PM, Umesh Nand <[hidden email]> wrote:
Now this is what i got after making changes suggested by you:

Inline image 1Inline image 3

Everything is working fine and its generating the html report also.

Now can i say that the basic TestNG set up is ready to use..?

On Wed, Oct 28, 2015 at 5:20 PM, Krishnan Mahadevan <[hidden email]> wrote:
Get rid of the call to "System.exit(0);" and try again. You are not supposed to be triggering an exit call to the JVM. 
After TestNG runs the test, it still triggers a few listener calls which are responsible for showing test results.

But since you are killing the JVM with that System.exit() call, I am guessing TestNG never manages to get any of that done.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:16 PM, Umesh Nand <[hidden email]> wrote:
Thanks for help Krishnan,

Now i am able to execue TestNG script but the result windows are not displaying output in proper fashion

Console should display result in this manner                                         But displaying in this way
 Selenium TestNG tutorial 18                       Inline image 1

Expected TestNG Result window                                                           Actual TestNG Result window what I am getting

Selenium TestNG tutorial 19          Inline image 2


Did i make any changes to get the desired result window..

Thanks..

















On Wed, Oct 28, 2015 at 11:50 AM, Krishnan Mahadevan <[hidden email]> wrote:
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Umesh Nand
Thanks a lot for your kind help Krishnan!!!!!

Can I contact you in case i wont be able to resolve any issue while implementing TestNG Framework??

Regards,
Umesh


On Wed, Oct 28, 2015 at 6:35 PM, Krishnan Mahadevan <[hidden email]> wrote:
Yep. You are good to start exploring TestNG ! Have fun :)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:45 PM, Umesh Nand <[hidden email]> wrote:
Now this is what i got after making changes suggested by you:

Inline image 1Inline image 3

Everything is working fine and its generating the html report also.

Now can i say that the basic TestNG set up is ready to use..?

On Wed, Oct 28, 2015 at 5:20 PM, Krishnan Mahadevan <[hidden email]> wrote:
Get rid of the call to "System.exit(0);" and try again. You are not supposed to be triggering an exit call to the JVM. 
After TestNG runs the test, it still triggers a few listener calls which are responsible for showing test results.

But since you are killing the JVM with that System.exit() call, I am guessing TestNG never manages to get any of that done.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:16 PM, Umesh Nand <[hidden email]> wrote:
Thanks for help Krishnan,

Now i am able to execue TestNG script but the result windows are not displaying output in proper fashion

Console should display result in this manner                                         But displaying in this way
 Selenium TestNG tutorial 18                       Inline image 1

Expected TestNG Result window                                                           Actual TestNG Result window what I am getting

Selenium TestNG tutorial 19          Inline image 2


Did i make any changes to get the desired result window..

Thanks..

















On Wed, Oct 28, 2015 at 11:50 AM, Krishnan Mahadevan <[hidden email]> wrote:
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

Krishnan Mahadevan
You will find me and even bigger experts on this forum. So feel free to post new queries on the forum than individually reaching out to people.
Your queries on the forum will serve as a knowledge base for future users, you will stand a better chance of getting faster responses from the experts in this group and also have the liberty of picking and choosing the best of solutions from the different alternatives that folks here may have to offer for you.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 6:39 PM, Umesh Nand <[hidden email]> wrote:
Thanks a lot for your kind help Krishnan!!!!!

Can I contact you in case i wont be able to resolve any issue while implementing TestNG Framework??

Regards,
Umesh


On Wed, Oct 28, 2015 at 6:35 PM, Krishnan Mahadevan <[hidden email]> wrote:
Yep. You are good to start exploring TestNG ! Have fun :)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:45 PM, Umesh Nand <[hidden email]> wrote:
Now this is what i got after making changes suggested by you:

Inline image 1Inline image 3

Everything is working fine and its generating the html report also.

Now can i say that the basic TestNG set up is ready to use..?

On Wed, Oct 28, 2015 at 5:20 PM, Krishnan Mahadevan <[hidden email]> wrote:
Get rid of the call to "System.exit(0);" and try again. You are not supposed to be triggering an exit call to the JVM. 
After TestNG runs the test, it still triggers a few listener calls which are responsible for showing test results.

But since you are killing the JVM with that System.exit() call, I am guessing TestNG never manages to get any of that done.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 5:16 PM, Umesh Nand <[hidden email]> wrote:
Thanks for help Krishnan,

Now i am able to execue TestNG script but the result windows are not displaying output in proper fashion

Console should display result in this manner                                         But displaying in this way
 Selenium TestNG tutorial 18                       Inline image 1

Expected TestNG Result window                                                           Actual TestNG Result window what I am getting

Selenium TestNG tutorial 19          Inline image 2


Did i make any changes to get the desired result window..

Thanks..

















On Wed, Oct 28, 2015 at 11:50 AM, Krishnan Mahadevan <[hidden email]> wrote:
Umesh,

Download the jar from here : https://code.google.com/p/guava-libraries/

PS :

I will strongly encourage you to get yourself familiar with these basic things before delving into using TestNG so that you have a smooth experience learning TestNG. 



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:44 AM, Umesh Nand <[hidden email]> wrote:
If you don't mind, could you please tell how to fix CLASSPATH and what are the jars required to add, bcoz im completely new to eclipse and TestNG..

Thanks in advance.

On Wed, Oct 28, 2015 at 11:25 AM, Krishnan Mahadevan <[hidden email]> wrote:
No issues. I have pointed out the problem. Please fix your CLASSPATH and add up the required jars and try again. You should be good.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:22 AM, Umesh Nand <[hidden email]> wrote:
But i m not working with Maven Krishnan!!

On Wed, Oct 28, 2015 at 11:18 AM, Krishnan Mahadevan <[hidden email]> wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <[hidden email]> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <[hidden email]> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <[hidden email]> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <[hidden email]> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <[hidden email]> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 [hidden email].

To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
<a href="tel:09035604047" value="+919035604047" target="_blank">09035604047

--
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 [hidden email].
To post to this group, send email to [hidden email].
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception Org.testng.exception

vinayak hurkadli
In reply to this post by Krishnan Mahadevan
hi krishnan,

i am also facing the same issue 
code and the respective stacktrace is as trailing 
plz do help out to figure out the issue

================================================

package testNG_tutorial;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class myapplication {
System.setProperty("webdriver.gecko.driver","C:\\SeleniumGecko\\geckodriver.exe");
//System.setProperty("webdriver.gecko.driver","C:\\SeleniumGecko\\geckodriver.exe");
WebDriver driver=new FirefoxDriver();
@Test
public void startApp()
{
driver.get("https://enterprise-demo.orangehrmlive.com/auth/login");
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS );
String currentURL=driver.getCurrentUrl();
Assert.assertTrue(currentURL.contains("auth/login"));
}
@Test(dependsOnMethods="startApp")
public void loginApp()
{
driver.findElement(By.xpath(".//*[@id='divUsername']/span")).sendKeys("Admin");
driver.findElement(By.xpath(".//*[@id='divPassword']/span")).sendKeys("admin");
driver.findElement(By.xpath(".//*[@id='btnLogin']")).click();
boolean status=driver.findElement(By.xpath(".//*[@id='menu_admin_viewAdminModule']/b")).isDisplayed();
  Assert.assertTrue(status);
}
@Test(dependsOnMethods="loginApp")
public void logoutApp()
{
driver.findElement(By.xpath(".//*[@id='welcome']")).click();
driver.findElement(By.xpath("//a[text()='Logout']")).click();
Assert.assertTrue(driver.findElement(By.xpath(".//*[@id='txtUsername']")).isDisplayed());
}
}

==============================
and the stacktrace for the above program is as below

==========================================
org.testng.TestNGException: 
Cannot instantiate class testNG_tutorial.myapplication
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:31)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:410)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:323)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:126)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:191)
at org.testng.TestClass.getInstances(TestClass.java:99)
at org.testng.TestClass.initTestClassesAndInstances(TestClass.java:85)
at org.testng.TestClass.init(TestClass.java:77)
at org.testng.TestClass.<init>(TestClass.java:42)
at org.testng.TestRunner.initMethods(TestRunner.java:423)
at org.testng.TestRunner.init(TestRunner.java:250)
at org.testng.TestRunner.init(TestRunner.java:220)
at org.testng.TestRunner.<init>(TestRunner.java:169)
at org.testng.remote.support.RemoteTestNG6_10$1.newTestRunner(RemoteTestNG6_10.java:28)
at org.testng.remote.support.RemoteTestNG6_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_10.java:61)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:616)
at org.testng.SuiteRunner.init(SuiteRunner.java:185)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:131)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1383)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1363)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1217)
at org.testng.TestNG.runSuites(TestNG.java:1144)
at org.testng.TestNG.run(TestNG.java:1115)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:23)
... 25 more
Caused by: java.lang.Error: Unresolved compilation problems: 
Syntax error on token ".", @ expected after this token
Syntax error on token ",", < expected
Syntax error, insert "SimpleName" to complete QualifiedName
Syntax error, insert "Identifier (" to complete MethodHeaderName
Syntax error, insert ")" to complete MethodDeclaration

at testNG_tutorial.myapplication.<init>(myapplication.java:13)
... 30 more
=========================================================


On Wednesday, October 28, 2015 at 11:18:37 AM UTC+5:30, Krishnan wrote:
Yes finally !

Well at the bottom of the stacktrace lies your problem. You are having classpath issues and missing some JARS.



Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more

If you are working with a Maven project, try adding the below as a dependency and try again.

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>


On the whole, this no longer seems to be a TestNG relevant query. 





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/
My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 11:10 AM, Umesh Nand <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">una...@...> wrote:
I think you are asking for this:

org.testng.TestNGException: 
Cannot instantiate class TestNG.DemoTestNG
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382)
at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295)
at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:117)
at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183)
at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128)
at org.testng.TestRunner.initMethods(TestRunner.java:415)
at org.testng.TestRunner.init(TestRunner.java:241)
at org.testng.TestRunner.init(TestRunner.java:211)
at org.testng.TestRunner.<init>(TestRunner.java:165)
at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:142)
at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587)
at org.testng.SuiteRunner.init(SuiteRunner.java:161)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:114)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1260)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1247)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1101)
at org.testng.TestNG.run(TestNG.java:1018)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
... 21 more
Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Function
at TestNG.DemoTestNG.<init>(DemoTestNG.java:14)
... 26 more
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 27 more


On Wed, Oct 28, 2015 at 11:05 AM, Krishnan Mahadevan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">krishnan.ma...@gmail.com> wrote:
And the complete stacktrace ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/
My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

On Wed, Oct 28, 2015 at 10:52 AM, Umesh Nand <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">una...@...> wrote:
Thanks for your reply Krishnan.
 Below is my code:

package TestNG;
import <a href="http://org.openqa.selenium.By" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Forg.openqa.selenium.By\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEfZQPnvt4Ug_Aq50kJ-TWrQ8CZyg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Forg.openqa.selenium.By\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEfZQPnvt4Ug_Aq50kJ-TWrQ8CZyg&#39;;return true;">org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.Test;

public class DemoTestNG {

        WebDriver driver = new FirefoxDriver();
        String appUrl = "<a href="http://192.168.1.116:9090/soxaudit/login" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F192.168.1.116%3A9090%2Fsoxaudit%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEl2sgU8gZ8Ftblw_WdpqbJgpEbHg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2F192.168.1.116%3A9090%2Fsoxaudit%2Flogin\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEl2sgU8gZ8Ftblw_WdpqbJgpEbHg&#39;;return true;">http://192.168.1.116:9090/soxaudit/login";

       @Test
        public void Sox_Login() {

        driver.get(appUrl);

        driver.manage().window().maximize();

        String expectedTitle = "SOX ADMIN - LOGIN";
       
                String actualTitle = driver.getTitle();
                Assert.assertEquals(expectedTitle,actualTitle);

        WebElement username = driver.findElement(By.id("j_username"));
        username.clear();
        username.sendKeys(new String[]{"sox"});

        WebElement password = driver.findElement(By.id("j_password"));
        password.clear();
        password.sendKeys(new String[]{"welcome@123"});

        //WebElement SignInButton = driver.findElement(By.id("login_from_loginpage"));
        WebElement SignInButton = driver.findElement(By.xpath("//*[@id='login-page']/div/form/div/button"));
        SignInButton.click();

        driver.close();
        System.out.println("Test script executed successfully.");

        System.exit(0);
    }
}


        

        








On Wed, Oct 28, 2015 at 9:51 AM, Krishnan Mahadevan <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">krishnan.ma...@gmail.com> wrote:
Unmesh,
Can you please share the complete stack-trace ? Also please help share your test code again [ after removing off all the commented out code ]

Walter,
I don't think that the package name is a problem here. To the best of my knowledge Java uses a package name to just decide on the namespace of a class and to prevent class name clashes.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/
My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

On Tue, Oct 27, 2015 at 9:43 PM, walter kelt <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">walte...@...> wrote:
Umesh, seems dangerous to use capitalized package names. It could be confused with a Class or Interface name. For a quick test, could you
change the package name to com.umesh

I'd be curious if the problem still occurs.

On Monday, August 19, 2013 at 8:18:08 AM UTC-4, Nasir N wrote:
When i run the script with testng i am getting this Exception....
please help me to resolve this...



org.testng.TestNGException:
Cannot instantiate class demo.Date_Range
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:38)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:409)
    at org.testng.TestRunner.init(TestRunner.java:235)
    at org.testng.TestRunner.init(TestRunner.java:205)
    at org.testng.TestRunner.<init>(TestRunner.java:160)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:271)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:577)
    at org.testng.SuiteRunner.init(SuiteRunner.java:157)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1299)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1286)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
    at org.testng.TestNG.run(TestNG.java:1057)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
    ... 21 more
Caused by: java.lang.NullPointerException
    at org.openqa.selenium.interactions.Actions.<init>(Actions.java:44)
    at dashboard.Config.<init>(Config.java:42)
    at Date_Range.Date_Range.<init>(Date_Range.java:9)
    ... 26 more

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.

To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/testng-users/8Xiv3fHyjtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.



--
Thanks & Regards,
Umesh Nand
09035604047

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="mSUjmD_PDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/testng-users&#39;;return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Loading...