1

I need to specify the directory path where I want the files to be downloaded. The test I am doing with Karate DSL and the browser is chrome

I have tried several options, but the files are always downloaded in the /downloads folder. This is my code:

Feature: download json

@debug
Scenario: download json
    * configure driver = { type: 'chrome', addOptions:["--add_experimental_option('prefs','C:\\workspaces\\gs\\src\test\\java\\ui_gs\\qa')"]}
    Given driver 'http://localhost:52330/src/test/java/ui_gs/encrypt_json.html'
    And input('#rol','adm')
    And input('#usuario','users')
    When click('#button_json')
    Then match text('#user_AES') != 'null'

The test writes to two input fields. Clicking on the field with id "button_json" downloads a json file.

0 Answers0