小编Div*_*gar的帖子

会话 ID 为空。调用 quit() 后使用 Web 驱动程序?代码在chrome、ie11和edge浏览器中正确执行,但在firefox 55.0.3中不正确

这是我调用网络驱动程序的代码。

public class WebDriverUtils {

private static final String karyahost = EnvironmentUtils.getProperty("karya.host", "");
private static final String karyaport = EnvironmentUtils.getProperty("karya.port", "");
private static final long timeOut = 15;
public static RemoteWebDriver webDriver = null;
private static WebDriverWait wait = null;

/**
 * Close the browser
 */
public static void closeBrowser() throws Exception{
    if (webDriver == null) {
        return;
    }
    webDriver.close();
    Thread.sleep(4000);
    webDriver.quit();
    webDriver = null;
}

/***
 * Wait for web element
 * @param element - element to be search …
Run Code Online (Sandbox Code Playgroud)

firefox selenium google-chrome geckodriver

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

firefox ×1

geckodriver ×1

google-chrome ×1

selenium ×1