对于写Selenium RC的测试,我们必须首先启动Selenium Server,可以写一个bat文件来完成这一点:
Title Start Selenium Server
cd C:\selenium-remote-control-1.0.1\selenium-server-1.0.1
java -jar selenium-server.jar
cd C:\selenium-remote-control-1.0.1\selenium-server-1.0.1
java -jar selenium-server.jar
另外一种方式
代码
@echo off
@set SELENIUM_FRAMEWORK_DIR=D:\Selenium_Framework
@set SELENIUM_SERVER_JAR_DIR=C:\selenium-remote-control-1.0-beta-2\selenium-server-1.0-beta-2
@rem start selenium server
@start java -jar %SELENIUM_SERVER_JAR_DIR%\selenium-server.jar -firefoxProfileTemplate %SELENIUM_FRAMEWORK_DIR%\Library\firefox_certProfile
@rem start java -jar %SELENIUM_SERVER_JAR_DIR%\selenium-server.jar -trustAllSSLCertificates
@set SELENIUM_FRAMEWORK_DIR=D:\Selenium_Framework
@set SELENIUM_SERVER_JAR_DIR=C:\selenium-remote-control-1.0-beta-2\selenium-server-1.0-beta-2
@rem start selenium server
@start java -jar %SELENIUM_SERVER_JAR_DIR%\selenium-server.jar -firefoxProfileTemplate %SELENIUM_FRAMEWORK_DIR%\Library\firefox_certProfile
@rem start java -jar %SELENIUM_SERVER_JAR_DIR%\selenium-server.jar -trustAllSSLCertificates