Selenium-IDE:使用 qooxdoo 用户扩展定位器和 UI 元素映射功能
我想知道如何(如果有人成功的话)从 UI-Element 映射文件中使用 Selenium-IDE 的 user-extension.js
文件提供的 qooxdoo 元素定位器。
UI 元素映射文件将包含如下条目:
map.addElement('page', {
name: 'accept-button',
description: '...',
locator: 'qxh=child[4]/qx.ui.core.scroll.ScrollPane/qx.ui.container.Composite/child[1]'
});
然后 Selenium 测试用例中的定位器可以是:
qxClick ui=page::accept-button()
当使用标准 Selenium 定位器定义但使用 qooxdoo 扩展定位器(< code>qxh、qxhv
等)似乎不起作用。
在尝试在 Selenium-IDE Firefox 插件中调试 JavaScript 后,很明显,在尝试解析 ui=...
Selenium 的过程中,执行上下文有些奇怪。当目标是使用上面的 qooxdoo 定位器定义时的定位器。
我对 Firefox 附加组件的开发过程不是很熟悉,而且这些附加组件似乎很难调试,甚至连 LOG
方法都受到我提到的执行上下文奇怪的影响,因此不会产生任何输出在解决 qooxdoo 定位器时涉及的方法中,这使得该过程更加难以遵循。
我将继续关注这个问题一段时间,但任何帮助将不胜感激。
我目前正在 Firefox 7.0.1 和 qooxdoo 1.3.1 中为应用程序使用 Selenium-IDE 1.3.0 插件正在测试中。
I would like to know how (if anyone has made it work) to use the qooxdoo element locators provided by the user-extension.js
file for Selenium-IDE from within UI-Element mapping files.
The UI-Element mapping file would contain entries like:
map.addElement('page', {
name: 'accept-button',
description: '...',
locator: 'qxh=child[4]/qx.ui.core.scroll.ScrollPane/qx.ui.container.Composite/child[1]'
});
and then a locator in a Selenium test case could be:
qxClick ui=page::accept-button()
I have successfully matched UI-Elements in this way when they are defined with a standard Selenium locator but using the qooxdoo extension locators (qxh
, qxhv
etc.) just doesn't seem to work.
After going round in circles attempting to debug the JavaScript inside the Selenium-IDE Firefox add-on it is apparent that there is something odd about the execution context during the attempt to resolve the ui=...
Selenium locators when the target is defined using a qooxdoo locator as above.
I am not very familiar with the Firefox add-on development process and it seems these are notoriously difficult to debug, even the LOG
methods are affected by the execution context oddity I mentioned such that no output is produced from within the methods involved when resolving the qooxdoo locators which makes the process even harder to follow.
I'm going to continue looking at this for a while but any help would be appreciated.
I am currently using Selenium-IDE 1.3.0 add-on inside Firefox 7.0.1 and qooxdoo 1.3.1 for the application under test.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您不能仅使用 Selenium IDE 运行。您必须使用 Qooxdoo 的模拟器组件,并使用 Qooxdoo API 和 Selenium API 在 javascript 中编写测试用例。
使用Qooxdoo1.4或以上版本(当前版本为1.6),Qooxdoo团队已将Inspector和Simulator组件集成到SDK本身中。您不必像 qooxdoo1.3 中那样单独设置这些组件。
我和我的朋友为 qooxdoo 写了一份初学者指南。它包含一个单独的测试和调试章节。
该书的详细信息可以在 http://link.packtpub.com/sQxPXC 找到
由于这本书刚刚推出,有一些介绍性优惠!
〜拉菲
You cannot run only with Selenium IDE. You have to use the Simulator component of Qooxdoo and write test cases in javascript using Qooxdoo API and Selenium API.
Use Qooxdoo1.4 or above (current version is 1.6), Qooxdoo team have integrated the Inspector and Simulator components into the SDK itself. You don't have to setup those components separately as in qooxdoo1.3.
I and my friend wrote a beginner's guide for qooxdoo. It contains a separate chapter for Testing and Debugging.
The book details can be found at http://link.packtpub.com/sQxPXC
There is some introductory offer as the book is just launched!
~raffi
错误,您可以单独使用 Selenium IDE :
http://simplapi.wordpress.com/2012/08/24/qooxdoo-and-selenium-ide-alternate-testing-system/
False, you can use Selenium IDE by itself :
http://simplapi.wordpress.com/2012/08/24/qooxdoo-and-selenium-ide-alternate-testing-system/