var webdriver = require('selenium-webdriver');
var browser = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
const {Then, When} = require('cucumber');
const assert = require('assert');
When(/^I search Google for "([^"]*)"$/, (text) =>{
browser.get('http://www.google.com');
}) ;
When(/^I enter "([^"]*)" in input$/, function(expression){
browser.get('http://www.google.com');
}) ;
答案 0 :(得分:0)
您需要将“何时”和“然后”合并为一个无效的const。要解决此问题,您可以使用“ {cum,then}}从“ cucumber”中导入;