使用 Cucumber 和 Selenium 查找用于 Salesforce 自动化测试的 xpath

Finding xpaths using cucumber and selenium for Salesforce automation testing

描述如何确定相对 xpath 的最佳免费在线教程在哪里?我正在使用 Cucumber 和 Selenium 开发一个 Salesforce 项目,由于 Salesforce 的动态特性,我们只能使用 xpath(而不是 ID 或 css)。最佳备忘单也将不胜感激。注意:右键单击并复制 xpath 不适用于此项目。我们在 Chrome 上使用 Chropath 扩展,但它只在大约 60% 的时间内有效。我需要能够为其他 40% 编写 xpaths 脚本。注意:这是一个基于 Java 框架的 Selenium IDE,并且只使用 Chrome 浏览器,因此 Firefox 检查工具在这种情况下不起作用。感谢您的回答!

有很多备忘单,其中一些位于 google 搜索结果的顶部 -

  1. PDF's cheat sheet to have them always handy
  2. another online best cheat sheet to have as bookmark
  3. LeCoupa's collection on git hub