{"id":2492,"date":"2023-08-09T10:41:49","date_gmt":"2023-08-09T02:41:49","guid":{"rendered":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/api-send-the-file-to-the-webpage-human-analog-input\/"},"modified":"2024-12-04T15:26:14","modified_gmt":"2024-12-04T07:26:14","slug":"api-send-the-file-to-the-webpage-human-analog-input","status":"publish","type":"docs","link":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/api-send-the-file-to-the-webpage-human-analog-input\/","title":{"rendered":"API Send the File to the Webpage (Human analog input)"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>API Send the file to the webpage (Human analog input):<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Request Url: <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/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=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Request Type: POST\/GET<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<figure class=\"wp-block-table has-medium-font-size\"><table><tbody><tr><td><strong>Name<\/strong><\/td><td><strong>Type<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>required<\/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 (<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Enter<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Escape<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">Tab<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkLeft<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkUp<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkRight<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkDown<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkDelete<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkEnd<\/mark><\/code>&nbsp;<code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">vkHome<\/mark><\/code>&nbsp;<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=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Body<br>x-www-form-urlencoded<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/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\": \"86AE6678-CFA1-4A38-94C2-6265CB25C404\",\n    \"value\": \"eGxvZ2lu\"\n}<\/mark>\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The value needs to be transmitted in base64 encoding to prevent GET transmission failure. If value=\"eGxvZ2lu\" is decoded as \"xlogin\"&nbsp; that is to send the \"xlogin\" string in this web control.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Please note that these automatic operations can only be performed after the web page is completely loaded, otherwise, the actions may be blocked.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Note:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">1. Enable browser automation settings and save the settings on the XLogin client. For the tutorial, please refer to the&nbsp;<strong><a href=\"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/launch-the-browser-automation-port\/?swcfpc=1\" target=\"_blank\" rel=\"noreferrer noopener\">\"Launch the browser automation port\"<\/a><\/strong>;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">2. profileId: Please refer to the&nbsp;<strong><a href=\"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/where-can-the-profile-id-be-found\/?swcfpc=1\" target=\"_blank\" rel=\"noreferrer noopener\">\"Where can the Profile ID be Found?\"<\/a><\/strong>&nbsp;tutorial or use the&nbsp;<strong><a href=\"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/api-get-the-list-of-all-available-browser-profiles\/?swcfpc=1\" target=\"_blank\" rel=\"noreferrer noopener\">profile\/list interface<\/a><\/strong>&nbsp;to get all profileId;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">3. Find elementId: Please refer&nbsp;<strong><a href=\"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/api-find-element\/?swcfpc=1\" 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=\"782\" height=\"513\" src=\"https:\/\/www.xlogin.us\/help\/wp-content\/uploads\/2023\/08\/\u56fe9-1.png\" alt=\"\" class=\"wp-image-2497\" srcset=\"https:\/\/www.xlogin.us\/help\/wp-content\/uploads\/2023\/08\/\u56fe9-1.png 782w, https:\/\/www.xlogin.us\/help\/wp-content\/uploads\/2023\/08\/\u56fe9-1-300x197.png 300w, https:\/\/www.xlogin.us\/help\/wp-content\/uploads\/2023\/08\/\u56fe9-1-768x504.png 768w\" sizes=\"auto, (max-width: 782px) 100vw, 782px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><br><br><\/p>\n","protected":false},"featured_media":0,"parent":810,"menu_order":41,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-2492","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/2492","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/comments?post=2492"}],"version-history":[{"count":7,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/2492\/revisions"}],"predecessor-version":[{"id":3360,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/2492\/revisions\/3360"}],"up":[{"embeddable":true,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/810"}],"next":[{"title":"API Check the Profile is Running Correctly","link":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/api-check-the-profile-is-running-correctly\/","href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/2501"}],"prev":[{"title":"API Get Webpage Source Code","link":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/api-get-webpage-source-code\/","href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/2474"}],"wp:attachment":[{"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/media?parent=2492"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/doc_tag?post=2492"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}