来自命令行的 Selenium 2 Web 驱动程序 [英] Selenium 2 web driver from the command line

查看:28
本文介绍了来自命令行的 Selenium 2 Web 驱动程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前这样做过,但似乎脑子冻结了,谷歌也没有帮助

I have done this before but seem to be having a brain freeze and google is not helping

我在带有 Eclipse 的 Java 中有 selenium 2 Web 驱动程序,我只想从命令行运行脚本(类,java).

I have selenium 2 web driver in Java with eclipse and I simply want to run a script (class, java) from the command line.

推荐答案

设置类路径,编译代码,然后运行代码.大致上,

Set the classpath, compile the code and then run the code. Something along the lines,

set classpath=c:\path\to\my\project\bin\.;c:\path\where\all\required\jars\*;
javac mywebdriver.java
java  mywebdriver

我建议您查看 Ant 来构建您的代码,而不是像上面那样..

I would suggest you to look at Ant for building your code than something like above..

这篇关于来自命令行的 Selenium 2 Web 驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆