karate icon indicating copy to clipboard operation
karate copied to clipboard

[ui] improve auto-screenshot on error in report

Open ptrthomas opened this issue 7 months ago • 2 comments

when line 13 failed the screenshot is attached to the next line (16) even if it was not run which is confusing

image

sample test to replicate:

Feature: browser automation demo

  Background:
    * configure driver = { type: 'chrome' }

  Scenario: try to login to github
    and then do a google search

    Given driver 'https://github.com/login'
    And input('#login_field', 'YYY')
    And input('#password', 'world')
    When submit().click("input[name=commit]")
    Then match html('.flash-error') contains 'Bad username or password.'
    # And screenshot()

    Given driver 'https://google.com'
    # And click('{}Accept all')
    And input("[name=q][name=q]", 'karate dsl')
    When submit().click("input[name=btnI]")
    Then waitForUrl('https://github.com/karatelabs/karate')

ptrthomas avatar Nov 22 '23 15:11 ptrthomas