Also note that multipart file takes a JSON argument so that you can easily set the filename and the contentType (mime-type) in one step. Here is an example: binary.feature. can be specified like this: A special variable called Key will be available and you can see all the possible key codes here. Karate Framework is an open-source Behavior Driven Development (BDD) testing framework for API test automation, performance testing, and UI testing. Most servers expect the domain to be set correctly like this: Note that you can do the above as a one-liner like this: * cookie({ name: 'hello', value: 'world' }), just keep in mind here that then it would follow the rules of Enclosed JavaScript (not Embedded Expressions). Sending a file as the entire binary request body is easy (note that multipart is different): The HTTP verb - get, post, put, delete, patch, options, head, connect, trace. And since you can easily extend Karate using JavaScript, there is no need to compile Java code any more. So you can do this, without needing the https:// part: You can also switch by page index if you know it: This sets context to a chosen frame (or