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

id="rc-menu-uuid-*" 破坏了自动化脚本的执行 #425

Open
ghost opened this issue Nov 5, 2021 · 0 comments
Open

id="rc-menu-uuid-*" 破坏了自动化脚本的执行 #425

ghost opened this issue Nov 5, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Nov 5, 2021

用 Selenium IDE / UI.Vision / SideeX 录制的自动化脚本会优先使用 id 选择器,生成的 selector 如下:

//ul[@id='rc-menu-uuid-82370-17-business-page-popup']/li[2]/span[1]/a[1]

其中 "82370-17" 是随机生成的数字,录制的脚本运行时会重新打开页面,生成不同的随机数,导致录制的脚本找不到对应的元素,测试脚本运行失败。

请问下为什么会考虑在 id 属性里添加 uuid 随机数呢?可以换成使用 data-* 的自定义属性吗?

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

0 participants