【发布时间】:2018-05-04 03:22:12
【问题描述】:
我做了一些 selenium-webdriver ruby 代码。它可以工作,但现在我想使用 cucumber 来利用绿色和红色看起来不错的 html 报告。当我开始在名为 custom_steps.rb 的文件中使用一些代码时,它不起作用。
-
你能告诉我如何在这个文件中写下这一行吗:
require 'selenium-cucumber' # Do Not Remove This File # Add your custom steps here # $driver is instance of webdriver use this instance to write your custom code divs = $driver.find_elements(:xpath,"//div[@class='col-xs-12 check-box-container']/a/div"); custom_steps.rb 中的代码如何在
.feature文件中调用?
【问题讨论】: