Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Selenium Specflow步骤参数转换正则表达式不';不匹配_Selenium_Specflow - Fatal编程技术网

Selenium Specflow步骤参数转换正则表达式不';不匹配

Selenium Specflow步骤参数转换正则表达式不';不匹配,selenium,specflow,Selenium,Specflow,我是Specflow的新手,所以这可能是一个noob问题,但我已经测试了我的正则表达式,我非常确定它应该匹配我的输入 我的功能文件中有这个 然后选择列名称、Sku名称、地名 我的步骤定义: [When(@"Select columns (.*)")] public void WhenSelectTheColumnsToInclude(string[] columns) { } 最后是我的自定义参数转换 [StepArgumentTransformati

我是Specflow的新手,所以这可能是一个noob问题,但我已经测试了我的正则表达式,我非常确定它应该匹配我的输入

我的功能文件中有这个

然后选择列名称、Sku名称、地名

我的步骤定义:

    [When(@"Select columns (.*)")]
    public void WhenSelectTheColumnsToInclude(string[] columns)
    {
    }
最后是我的自定义参数转换

    [StepArgumentTransformation(@"\w[^,]+")]
    public string[] CommaSeperatedListTransform(string names)
    {
    }

正如我所说的,正则表达式是合法的,但我猜Specflow也在期待其他东西?

会出现什么错误?无法将字符串转换为字符串[]。此外,如果我在转换函数中放置断点,它将永远不会命中它。您是否尝试过将
字符串[]
更改为
列表
,以防数组出现异常情况。。。