The below works fine for me. So maybe you are missing something. A lot depends on the page, maybe there is some JS validation.
* driver 'https://github.com/login'
* input('#login_field', ' ')
* input('#password', ' ')
* submit().click("input[name=commit]")
* match html('#js-flash-container') contains 'Incorrect username or password.'
If still stuck, please follow this process: https://github.com/intuit/karate/tree/develop/examples/ui-test
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…