我可以将经过测试的Selenium IDE转换为Java中的Selenium Webdriver测试

问题描述 投票:0回答:1

我正在使用Ghost检查器记录我的测试。它确实允许我以Selenium IDE格式导出测试。我可以使用导出的测试将来编写Selenium Web驱动程序测试(JAVA)

导出的测试看起来像这样:

  1. 导航waitForPageToLoadwaitForElementPresent css = .explore-nav-label单击css = .explore-nav-labelwaitForPageToLoad
selenium-webdriver selenium-ide ghost-inspector
1个回答
0
投票

全部披露:我在Ghost Inspector工作。

看起来Selenium IDE团队最近从新的Selenium IDE v3中获得了added the ability to export tests,太好了!

将涉及几个步骤:

从Ghost检查器导出

Ghost Inspector dashboard中导航到您的测试,然后选择更多>导出此测试,然后选择新Selenium IDE(.side)格式:

enter image description here

单击下载并将文件保存在方便的位置。

使用Selenium IDE导入(和导出)

导入Selenium IDE就像打开刚从Ghost Inspector下载的.side文件一样简单。打开文件后,可以右键单击测试,然后在左侧窗格中选择导出。从那里,您将获得几种格式可供选择,包括Java JUnit:

Export .side tests to JUnit

一些注意事项

请记住,Ghost Inspector step actionsSelenium IDE commands尚不是完美的一对一匹配,因此Ghost Inspector中的某些操作将以Selenium格式显示为JavaScript操作。您可能需要根据需要对最终测试进行一些调整。

希望有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.