我正在使用最新的Chrome和Webdriver 2.33并且遇到了一些问题IgnoreExceptionTypes.在下面的代码中,webdriver会像我期望的那样等待,但它实际上不会忽略异常:
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(8));
wait.IgnoreExceptionTypes(
typeof(WebDriverTimeoutException),
typeof(NoSuchElementException)
);
wait.Until(ExpectedConditions.ElementIsVisible(By.XPath(firstResultX)));
Run Code Online (Sandbox Code Playgroud)
代码在try/catch中,我尝试将它移到try/catch之外并收到相同的问题.我不知道从哪里开始,任何帮助将不胜感激.
我正在尝试调查jmeter并且很快就遇到了一些问题.我试图按照http://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf上的教程进行操作.当我尝试启动录像机时,我得到一个无法创建代理错误.日志给我这条消息:
2013/10/23 13:40:54 INFO - jmeter.util.JsseSSLManager: Using default SSL protocol: TLS
2013/10/23 13:40:54 INFO - jmeter.util.JsseSSLManager: SSL session context: per-thread
2013/10/23 13:54:32 WARN - jmeter.protocol.http.proxy.ProxyControl: Could not open/read key store C:\apache-jmeter-2.10\bin\proxyserver.jks (The system cannot find the file specified)
2013/10/23 13:54:32 INFO - jmeter.protocol.http.proxy.ProxyControl: Creating Proxy CA in C:\apache-jmeter-2.10\bin\proxyserver.jks
2013/10/23 13:54:32 ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Cannot run program "keytool" (in directory "C:\apache-jmeter-2.10\bin"): CreateProcess error=2, The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)
我不知道为什么exe不会被选中,因为它是java的一部分,在我的路径中或为什么jmeter zip会排除必要的文件,所以我将keytool从我的java安装复制到它正在寻找的目录中再试一次.我什么时候得到了这个:
错误 …