我有一些測試代碼,當我嘗試以'Java應用程序'運行時使用TESTNG我什麼也沒看到。我沒有public static void main(String[] args)
,因爲TestNG不會提示它。作爲Java應用程序運行不起作用
import java.util.*;
import org.testng.annotations.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Testing
{
@Test
public void addNotificationMessage1(){
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
}
}
該項目以前在我的舊電腦上工作,但沒有更多。我使用的更新的TestNG項目也有同樣的問題。有沒有人有沒有想法?
http://stackoverflow.com/help/mcve –