Firefox没有从Ant和TestNg组合中启动

时间:2016-12-16 05:51:55

标签: selenium-webdriver ant testng selenium-firefoxdriver

我使用的是Selenium 2.53.0,Firefox版本是46.0.1。 请在下面找到我从Ant运行的代码:

unique_ptr<unique_ptr<int[]>[]>     smartPtr2D;
unique_ptr<int[]>                   smartPtr1D;

int dataCounter = 0;

smartPtr2D = make_unique< unique_ptr<int[]>[] >(3);
for (int i = 0; i<3; i++)
{
    smartPtr1D = make_unique<int[]>(5);
    for (int j = 0; j<5; j++)
    {
        smartPtr1D[j] = dataCounter;
        dataCounter++;
    }
    smartPtr2D[i] = move(smartPtr1D);
}

注意:

如果我运行eclipse中的代码按预期运行没有任何问题。但是如果我使用 @Test public void Browser() { // Luanching Firefox browser FirefoxDriver driver=new FirefoxDriver(); driver.get("http://flipkart.com"); driver.quit(); } 从Ant运行相同的代码,我将收到以下错误:

Build.xml

请建议如何解决上述问题的解决方案?

0 个答案:

没有答案