小编Tar*_*ran的帖子

Visual Studio中的Specflow功能文件中没有颜色

我安装了最新版本的SpecFlow,但功能文件显示仍然没有颜色,就像这样......

(插入图像的代表不够)

Specflow无色功能文件

是否为Specflow文件中显示的颜色设置了某些配置?

VS2015 Specflow 2.1

.net c# visual-studio specflow gherkin

3
推荐指数
1
解决办法
7620
查看次数

仅在Visual Studio 2015的调试模式下引发WebDriverWait异常

我想知道是否还有其他人遇到过类似的问题或有使用WebDriverWait的经验?

如果他们知道为什么我会收到一个NoSuchElementException,它似乎只在调试模式下抛出。在正常运行时运行测试时,我不会抛出此错误。

我可以单击继续,也可以跳过异常。

在此处输入图片说明

c# selenium exception visual-studio selenium-webdriver

3
推荐指数
2
解决办法
236
查看次数

有没有办法使用空手道写入文本文件

在我的空手道测试中,我需要将响应 id 写入 txt 文件(或任何其他文件格式,例如 JSON),我想知道它是否有能力做到这一点,我在文档中没有看到其他内容。在否的情况下,是否有一个简单的 JavaScript 函数可以这样做?

dsl karate

2
推荐指数
1
解决办法
5008
查看次数

空手道功能文件中的 String.split() 返回异常

我不确定如何从已创建的功能中拆分响应字符串以获取响应标头“位置”值。

我试过的

1)

Feature: Create Tariff

  Background:
  * def result = call read('../../get-user-token.feature')
  * def serviceId = call read('create-service.feature')

  Scenario: Create Tariff
    Given url 'https://app-dev.topbox.pro/tariff-svc/api/v1/tariffs'
    And header Authorization = result.response.token_type + " " + result.response.access_token
    And request
      """
      {
      serviceTypeId: '#(serviceId.responseHeaders['Location'].split('/')[1])',
      owner: 1,
      type: 0,
      pencePerMile: '69.69',
      minMileage: '1.00',
      minCost: 5,
      zoneFrom: '',
      zoneTo: '',
      fixedCost: 0
      }
      """
    When method POST
    Then status 201
Run Code Online (Sandbox Code Playgroud)

这导致...

IntegrationTests.TestSetup.create-tariff:create-tariff.feature:10 - net.minidev.json.parser.ParseException:位置 46 处出现意外标记 L。

2)

Feature: Create Tariff

  Background:
  * def result …
Run Code Online (Sandbox Code Playgroud)

javascript dsl karate

1
推荐指数
1
解决办法
3148
查看次数