简体   繁体   English

Selenium Java示例(是否需要Selenium IDE)?

[英]Selenium Java example (is Selenium IDE required)?

Is it necessary to download Selenium IDE to execute Selenium examples? 是否需要下载Selenium IDE才能执行Selenium示例?

I am trying to execute a Selenium application on Java. 我正在尝试在Java上执行Selenium应用程序。 Please, help me with the steps and a sample example... 请帮我提供步骤和示例示例...

No, it is not necessary. 不,没有必要。

Selenium IDE is a tool (a Firefox addon) for recording testcases without writing any code. Selenium IDE是一个无需编写任何代码即可记录测试用例的工具(一个Firefox插件)。 It works internally with Selenium RC and can export it's code to some languages. 它在内部与Selenium RC一起使用,并且可以将其代码导出为某些语言。

If you want to write Java code, use Selenium RC or Selenium 2 (WebDriver) with any Java IDE you like. 如果要编写Java代码,请在您喜欢的任何Java IDE中使用Selenium RCSelenium 2(WebDriver)

As Selenium 2 is recommended nowadays, you should use that. 由于现在建议使用硒2,因此应该使用它。 This page from WebDriver docs is full of examples. WebDriver文档中的此页面包含许多示例。

Selenium docs says you can use any IDE the only requirement is selenium.jar should be in your class path. Selenium文档说您可以使用任何IDE,唯一的要求是selenium.jar应该在您的类路径中。 i think you should go with Eclipse IDE. 我认为您应该使用Eclipse IDE。 Follow the link for Configuration . 单击“配置”链接。 Configuring Selenium With Eclipse 使用Eclipse配置Selenium

If you want to write selenium code manually you don't need to download selenium IDE. 如果要手动编写Selenium代码,则无需下载Selenium IDE。 But if you want to get java code directly, you need to download it. 但是,如果您想直接获取Java代码,则需要下载它。 In this you can record a testcase and you can export that in java. 在这里,您可以记录一个测试用例,并可以将其导出为Java。 So it is your choice.. 因此,这是您的选择。

Selenium IDE is Addons of Firefox. Selenium IDE是Firefox的附加组件。 It is used only for recording your tests so that time is saved. 它仅用于记录测试以节省时间。 Recorded code can be exported to your desired language (Java, PHP, Python etc.) 记录的代码可以导出为您想要的语言(Java,PHP,Python等)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM