如何在空手道ui自动化中上传视频文件? [英] How to upload the video file in karate ui automation?
问题描述
能否请您帮我创建空手道ui代码,以这种结构上传视频文件:
Could you please help me to create karate ui code for uploading video file in this structure:
#shadow-Root(Open)
<div name="upload" class="upload vertical layout flex iron-selected" tabindex="0">
<div class="suggester">
<nuxeo-path-suggestion id="pathSuggesterUpload" always-float-label=""></nuxeo-path-suggestion>
<span class="horizontal layout "></span>
</div>
<div id="dropzone" class="vertical layout flex">
<input hidden="" id="uploadFiles" type="file" multiple="">
<div class="vertical layout center center-justified flex">
<div class="dropzone-label horizontal layout center center-justified">
<a href="javascript:undefined">
Drag and drop, or click to select files to upload.</a>
</div>
<span>or link files from</span>
<div class="importActions horizontal layout wrap">
我尝试了以下代码进行上传,但是在单击上传"按钮后,链接文件的上传窗口没有出现:
I tried below code to upload, but after clicking on upload button link file upload window is not appearing :
*script('document.querySelector("#importPopup").shadowRoot.querySelector("#bulkCreation").shadowRoot.querySelector("#dropzone > div > div.dropzone-label.horizontal.layout.center.center-justified > a").click()')
* def pathOffile = '/Users/shilpisharma/Documents/batman.mp4'
* driver.inputfile('//*[@id="dropzone"]/div/div[1]/a', pathOfFile)
chrome版本为:81.0.4044.138版(正式版本)(64位)
chrome version is: Version 81.0.4044.138 (Official Build) (64-bit)
推荐答案
This is not yet released, here is the documentation for Chrome: https://github.com/intuit/karate/tree/develop/karate-core#driverinputfile
您可以使用开发人员指南来构建和测试: https://github. com/intuit/karate/wiki/Developer-Guide
You can use the developer guide to build and test: https://github.com/intuit/karate/wiki/Developer-Guide
或者您必须等待下一个版本.
Or you have to wait for the next version.
这篇关于如何在空手道ui自动化中上传视频文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!