{"id":3085,"date":"2023-06-30T09:20:56","date_gmt":"2023-06-30T01:20:56","guid":{"rendered":"https:\/\/www.vmlogin.us\/help\/?p=3085"},"modified":"2023-08-14T13:02:02","modified_gmt":"2023-08-14T05:02:02","slug":"send-keys","status":"publish","type":"post","link":"https:\/\/www.vmlogin.us\/help\/api\/send-keys.html","title":{"rendered":"API Send the File to the Webpage(Human Analog Input)"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Send the file to the webpage using the API interface:<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">Request Url:<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">http:\/\/127.0.0.1:35000\/api\/v1\/profile\/sendKeys<\/mark><\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">Request Type: GET<\/p>\n\n\n\n<figure class=\"wp-block-table has-medium-font-size\"><table><tbody><tr><td><strong><strong>Name<\/strong><\/strong><\/td><td><strong><strong>Type<\/strong><\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong><strong>required<\/strong><\/strong><\/td><\/tr><tr><td>profileId<\/td><td>string<\/td><td>Browser profile ID<\/td><td>true<\/td><\/tr><tr><td>elementId<\/td><td>string<\/td><td>The elementId obtained by finding the element through findElement<\/td><td>false<\/td><\/tr><tr><td>value<\/td><td>string<\/td><td>Send a string to this web control <br>(<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Enter<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Escape<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Tab<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkLeft<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkUp<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkRight<\/mark><\/code><br><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkDown<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkDelete<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkEnd<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkHome<\/mark><\/code> <code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkBack<\/mark><\/code>)<\/td><td>true<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">Body<br>x-www-form-urlencoded<\/p>\n\n\n\n<pre class=\"wp-block-code has-medium-font-size\"><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">{\n    \"profileId\": \"17D40B01-566A-4E3F-888A-C40A404668B8\",\n    \"value\": \"dm1sb2dpbg==\"\n}<\/mark><\/code><\/pre>\n\n\n\n<p class=\"has-medium-font-size\">The value needs to be transmitted in base64 to prevent GET transmission failure. If value=\"dm1sb2dpbg==\" is decoded as \"vmlogin\", it is the web control that sends the \"vmlogin\" string.  <\/p>\n\n\n\n<p class=\"has-medium-font-size\">Please note that the page must be loaded before these automated operations can be performed, otherwise, there is a chance that the action will be blocked.<\/p>\n\n\n\n<p><br><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Note:<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">(1) When using the Local Interface, you need to Enable browser automation settings on the VMLogin client and save the settings. Please refer to the tutorial&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.vmlogin.us\/help\/api\/browser-automation-interface.html\" target=\"_blank\">\"Launch the browser automation port\"<\/a><\/strong>;<\/p>\n\n\n\n<p class=\"has-medium-font-size\">(2) For profiled, please refer to the tutorial&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.vmlogin.us\/help\/api\/where-is-profile-id.html\" target=\"_blank\">\"Where is the profile ID\"<\/a><\/strong> or use the&nbsp;<strong><a href=\"https:\/\/www.vmlogin.us\/help\/api\/get-list-of-available-browser-profile.html\">profile\/list interface<\/a><\/strong>&nbsp;to get all profileId;<\/p>\n\n\n\n<p class=\"has-medium-font-size\">(3) For elementId, please refer to the&nbsp;<strong><a href=\"https:\/\/www.vmlogin.us\/help\/api\/find-element.html\" data-type=\"URL\" data-id=\"https:\/\/www.vmlogin.us\/help\/api\/find-element.html\" target=\"_blank\" rel=\"noreferrer noopener\">\"Find Element\"<\/a><\/strong>&nbsp;tutorial.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"508\" src=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/06\/9-sendkeys-vmlogin.png\" alt=\"\" class=\"wp-image-3107\" srcset=\"https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/06\/9-sendkeys-vmlogin.png 793w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/06\/9-sendkeys-vmlogin-300x192.png 300w, https:\/\/www.vmlogin.us\/help\/wp-content\/uploads\/2023\/06\/9-sendkeys-vmlogin-768x492.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Send the file to the webpage using the API interface: R [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[],"class_list":["post-3085","post","type-post","status-publish","format-standard","hentry","category-api"],"_links":{"self":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts\/3085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/comments?post=3085"}],"version-history":[{"count":9,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts\/3085\/revisions"}],"predecessor-version":[{"id":3419,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/posts\/3085\/revisions\/3419"}],"wp:attachment":[{"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/media?parent=3085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/categories?post=3085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vmlogin.us\/help\/wp-json\/wp\/v2\/tags?post=3085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}