c#中的Selenium 2 OnException方法

时间:2012-10-23 08:28:28

标签: c# selenium-webdriver onexception

将Java代码移植到c#。我想在c#中重写以下Java代码。在此先感谢:)

// Called whenever an exception would be thrown.
    public void onException(java.lang.Throwable throwable, WebDriver driver){
        System.out.println("onException' Called whenever an exception would be thrown ...");
    }

1 个答案:

答案 0 :(得分:1)

喜欢翻译的方式如下:

public void OnException(System.Exception exception, IWebDriver driver)
{
    Console.WriteLine("OnException' Called whenever an exception would be thrown ...");
}