java - java包错误

标签 java selenium-webdriver

@Test

private void AutoItTest() throws IOException {
   java.lang.Runtime().getRuntime().exec("C:\\Selenium\\framework\\AutoITpopupHandler.exe");
}     

java.lang 提示错误请提供合适的解决方案。

最佳答案

Runtime 是一个类,您不会“调用”它。它应该是这样的:

Runtime.getRuntime().exec("C:\\Selenium\\framework\\AutoITpopupHandler.exe");

也不需要使用 java.lang 进行限定,但不会造成任何伤害。

关于java - java包错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22306188/

相关文章:

多元梯度下降的Java实现

java - WebDriver 在一定时间后关闭弹出窗口

python - selenium.common.exceptions.TimeoutException : Message: Timed out waiting for page to load using IEDriverServer and Internet Explorer through Selenium

angularjs - Selenium 点击事件不会触发 angularjs ng-click

java - 无法将带有类型参数的 Java 类重写为 Kotlin

java - 比较两个散列图值与键

c# - Selenium 为什么将 acceptuntrustedcertificates 设置为 true 对于 firefox 驱动程序不起作用?

java - Selenium WebDriver : I want to overwrite value in field instead of appending to it with sendKeys using Java

java - 在相对布局中,如何将运行时 TextView 显示在另一个 TextView 下方?

java - 如何使 m2e-android 包含 apk 打包的 native deps?