Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

只有xpath定位 #1

Closed
chenDoInG opened this issue Sep 6, 2013 · 3 comments
Closed

只有xpath定位 #1

chenDoInG opened this issue Sep 6, 2013 · 3 comments

Comments

@chenDoInG
Copy link

为什么只用xpath定位,没有css定位?css定位会有影响么?如果加上css定位的话可以很方便的使用seleniumIDE录制脚本,只要参数化一下就可以使用了,会比较方便初学者吧。

@chenkan
Copy link
Owner

chenkan commented Sep 6, 2013

关于只有XPath定位,主要在于公司内部的历史原因:
我们一直以来以使用XPath为主,工具及XPath编写技巧比较熟练了,而且统一成XPath以后方便新人快速掌握及大家互相code review

维护性方面的问题,实践证明,只要用例本身在持续运行(我们这边至少是每日构建,个别产品还是持续集成,用例执行频率很高)及维护,XPath变动带来的用例维护量其实是很小且分散的

所以,Dagger在开发之初就约定了只使用XPath,后面也没有加入其它定位方式
然后,开源的时候我就偷了个懒==!

从开源的角度讲,支持更多的定位方式也是应该的:)

@yisake
Copy link

yisake commented Jun 3, 2016

这里的xpath指的不是xpath绝对路径吧?

@chenkan
Copy link
Owner

chenkan commented Jun 3, 2016

_xpath_语法本身既支持绝对路径,也支持相对路径,事实上,大部分时间使用相对路径

@chenkan chenkan closed this as completed Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants