{"id":527,"date":"2023-02-07T09:54:21","date_gmt":"2023-02-07T01:54:21","guid":{"rendered":"https:\/\/www.xlogin.us\/help\/docs\/document\/api-automation\/how-to-integrate-xlogin-with-puppeteer\/"},"modified":"2024-12-04T15:26:13","modified_gmt":"2024-12-04T07:26:13","slug":"xlogin-with-puppeteer","status":"publish","type":"docs","link":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/xlogin-with-puppeteer\/","title":{"rendered":"How to Integrate XLogin with Puppeteer?"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>1. Using the Startup API :<\/strong><\/p>\n\n\n\n<p><br><em><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\/start?skiplock=true&amp;profileId=xxxxxxxxxxxxxxxxxxxxxxxxxxx<\/mark><\/em><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><br>The startup API will return :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\"status\":\"OK\",\"value\":\"http:\/\/127.0.0.1:18500\"}<\/code><\/pre>\n\n\n\n<p><br><br><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>2. Access with the IP and port returned in step 1 :<\/strong><\/p>\n\n\n\n<p><br><em><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">http:\/\/127.0.0.1:18500\/json\/version<\/mark><\/em><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><br>Returns a JSON string:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n   \"Browser\": \"Chrome\/102.0.5005.63\",\n   \"Protocol-Version\": \"1.3\",\n   \"User-Agent\": \"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/102.0.5005.63 Safari\/537.36\",\n   \"V8-Version\": \"10.2.154.4\",\n   \"WebKit-Version\": \"537.36 (@a45dd701fe466f94d3b0e13d1e51227b77b2b9ef)\",\n   \"webSocketDebuggerUrl\": \"ws:\/\/127.0.0.1:18500\/devtools\/browser\/15ed04d8-c64c-46a3-8b9a-f0f1dc27f586\"\n}<\/code><\/pre>\n\n\n\n<p><br><br><\/p>\n\n\n\n<p class=\"has-medium-font-size\">3. The&nbsp;<strong>webSocketDebuggerUrl<\/strong>&nbsp;returned in step 2 is the puppeteer connection browser websocks protocol address.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><br><br><\/p>\n\n\n\n<p><br><\/p>\n","protected":false},"featured_media":0,"parent":810,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-527","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/527","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=527"}],"version-history":[{"count":5,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/527\/revisions"}],"predecessor-version":[{"id":1366,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/527\/revisions\/1366"}],"up":[{"embeddable":true,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/810"}],"next":[{"title":"XLogin Browser Automation Test Tool Introduction","link":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/xlogin-browser-automation-test-tool-introduction\/","href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/530"}],"prev":[{"title":"JAVA Uses Code for Using XLogin Automation API Interface to Launch Browser","link":"https:\/\/www.xlogin.us\/help\/docs\/api-automation\/java-code-to-launch-browser\/","href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/docs\/524"}],"wp:attachment":[{"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/media?parent=527"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.xlogin.us\/help\/wp-json\/wp\/v2\/doc_tag?post=527"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}