Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有没有办法确定selenium是否正在使用代码运行?_Selenium - Fatal编程技术网

有没有办法确定selenium是否正在使用代码运行?

有没有办法确定selenium是否正在使用代码运行?,selenium,Selenium,我想知道selenium是否正在运行,如果没有,那么调用一个bat文件来启动它。是否可以确定selenium standalone是否正在运行?如果您使用的是Java,则可以通过编程方式调用服务器- RemoteControlConfiguration settings = new RemoteControlConfiguration(); File f = new File("C:\\selenium-profile"); settings.setFirefox

我想知道selenium是否正在运行,如果没有,那么调用一个bat文件来启动它。是否可以确定selenium standalone是否正在运行?

如果您使用的是Java,则可以通过编程方式调用服务器-

RemoteControlConfiguration settings = new RemoteControlConfiguration();
        File f = new File("C:\\selenium-profile");
        settings.setFirefoxProfileTemplate(f);
        settings.setReuseBrowserSessions(true);
        SeleniumServer seleniumserver=new SeleniumServer(settings);
        seleniumserver.boot();
        setUp("http://www.google.com", "*firefox");