org.testng.TestNGException:
Cannot instantiate class popgom.global.CommandeFittingCBTest
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.support.RemoteTestNG6_5$1.newTestRunner(RemoteTestNG6_5.java:26)
at org.testng.remote.support.RemoteTestNG6_5$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_5.java:59)
at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:561)
at org.testng.SuiteRunner.init(SuiteRunner.java:157)
at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
at org.testng.TestNG.createSuiteRunner(TestNG.java:1273)
at org.testng.TestNG.createSuiteRunners(TestNG.java:1260)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1114)
at org.testng.TestNG.run(TestNG.java:1031)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:126)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:137)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:58)
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:29)
... 21 more
Caused by: java.lang.NullPointerException: key can't be null
at java.lang.System.checkKey(System.java:838)
at java.lang.System.getProperty(System.java:714)
at popgom.global.CommandeFittingCBTest.<init>(CommandeFittingCBTest.java:71)
... 26 more
public class CommandeFittingCBTest {
public String remote = System.getProperty(URL OF MY NODE);
@Test
public void CommandeFittingCB() throws InterruptedException, IOException {
open("http://MYWEBSITE");
$(By.xpath("//p/a/img")).click();
$(By.xpath("//div[2]/div[2]/div/div/div/a/span")).waitUntil(present, 5000);
$(By.xpath("//div[2]/div[2]/div/div/div/a/span")).click();
$(By.xpath("//div[@id='cboxLoadedContent']/div/div[3]/a[2]/span")).waitUntil(present, 5000);
$(By.xpath("//div[@id='cboxLoadedContent']/div/div[3]/a[2]/span")).click();
$(By.xpath("//div[@id='deliveryTypePremiumButton']/a/span")).waitUntil(present, 5000);
$(By.xpath("//div[@id='deliveryTypePremiumButton']/a/span")).click();
$(By.xpath("//input[@id='addressField']")).waitUntil(present, 5000);
$(By.xpath("//input[@id='addressField']")).setValue("01000");
$(By.xpath("//div[2]/a/div")).click();
$(By.xpath("//td[5]/div/a/span")).click();
$(By.xpath("//div[2]/a/span")).waitUntil(present, 5000);
$(By.xpath("//div[2]/a/span")).click();
$(By.id("logEmailField")).waitUntil(present, 5000);
$(By.id("logEmailField")).setValue("ferau...@gmail.com");
$(By.id("logPwdField")).setValue("leamax");
$(By.xpath("//div[7]/div/div[2]/div/div[5]/a/span")).click();
$(By.xpath("//div[@id='loggedAccountFormCgv']/input")).waitUntil(present, 5000);
$(By.xpath("//div[@id='loggedAccountFormCgv']/input")).waitUntil(enabled, 5000);
$(By.xpath("//div[@id='loggedAccountFormCgv']/input")).click();
$(By.xpath("//div[3]/a/span")).click();
$(By.xpath("//select[@id='cardType-CARD']")).waitUntil(present, 5000);
$(By.xpath("//select[@id='cardType-CARD']")).selectOption("EUROCARD/MASTERCARD");
$(By.xpath("//div[2]/input")).setValue("feraud");
$(By.xpath("//div[5]/div/div[2]/input")).setValue("1111222233334444");
$(By.xpath("//select[@id='monthField-CARD']")).selectOption("01");
$(By.xpath("//select[@id='yearField-CARD']")).selectOption("2018");
$(By.xpath("//div[9]/div/div[2]/input")).setValue("123");
$(By.xpath("//div[5]/div[2]/a")).click();
--
You received this message because you are subscribed to the Google Groups "selenide" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenide+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi, and thanks for your help !
I've insert directly the url of my node in the public String remote = System.getProperty
No error at all, but the test continue to be run on my host instead of my VM.
Am i doing something wrong in my test configuration ?
--
System.setProperty("webdriver.chrome.driver", "C:\\PATH\\TO\\Chromedriver");Actually it's a good news, you are almost there. Now you just need to install Chrome browser. :)
--
Perfect it's working !Is this method can works for the Chromium navigator ?
--
I don't know exactly, I personally haven't tried it. Try to google it - this problem is not Selenide specific.
I've tried and it's not working in my VM with chromium, even when I specified the path to the chromium.exeHow would you do ?
--