puppeteer/assets/js/9e6ba083.c6570311.js
release-please[bot] d321f9557a deploy: 8c0ac61260
2023-12-06 08:09:55 +00:00

2 lines
4.0 KiB
JavaScript

/*! For license information please see 9e6ba083.c6570311.js.LICENSE.txt */
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[62778],{1099:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>d,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var n=t(85893),s=t(11151);const a={sidebar_label:"Frame.$x"},i="Frame.$x() method",o={id:"api/puppeteer.frame._x",title:"Frame.$x() method",description:"Warning: This API is now obsolete.",source:"@site/versioned_docs/version-21.6.0/api/puppeteer.frame._x.md",sourceDirName:"api",slug:"/api/puppeteer.frame._x",permalink:"/api/puppeteer.frame._x",draft:!1,unlisted:!1,tags:[],version:"21.6.0",frontMatter:{sidebar_label:"Frame.$x"},sidebar:"api",previous:{title:"Frame.$eval",permalink:"/api/puppeteer.frame._eval"},next:{title:"Frame.addScriptTag",permalink:"/api/puppeteer.frame.addscripttag"}},d={},l=[{value:"Signature:",id:"signature",level:4},{value:"Parameters",id:"parameters",level:2}];function p(e){const r={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h2:"h2",h4:"h4",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.h1,{id:"framex-method",children:"Frame.$x() method"}),"\n",(0,n.jsxs)(r.blockquote,{children:["\n",(0,n.jsx)(r.p,{children:"Warning: This API is now obsolete."}),"\n",(0,n.jsxs)(r.p,{children:["Use ",(0,n.jsx)(r.a,{href:"/api/puppeteer.frame.__",children:"Frame.$$()"})," with the ",(0,n.jsx)(r.code,{children:"xpath"})," prefix."]}),"\n",(0,n.jsxs)(r.p,{children:["Example: ",(0,n.jsx)(r.code,{children:"await frame.$$('xpath/' + xpathExpression)"})]}),"\n",(0,n.jsxs)(r.p,{children:["This method evaluates the given XPath expression and returns the results. If ",(0,n.jsx)(r.code,{children:"xpath"})," starts with ",(0,n.jsx)(r.code,{children:"//"})," instead of ",(0,n.jsx)(r.code,{children:".//"}),", the dot will be appended automatically."]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"signature",children:"Signature:"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-typescript",children:"class Frame {\n $x(expression: string): Promise<Array<ElementHandle<Node>>>;\n}\n"})}),"\n",(0,n.jsx)(r.h2,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Parameter"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"expression"}),(0,n.jsx)(r.td,{children:"string"}),(0,n.jsx)(r.td,{children:"the XPath expression to evaluate."})]})})]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Returns:"})}),"\n",(0,n.jsxs)(r.p,{children:["Promise<Array<",(0,n.jsx)(r.a,{href:"/api/puppeteer.elementhandle",children:"ElementHandle"}),"<Node>>>"]})]})}function c(e={}){const{wrapper:r}={...(0,s.a)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},75251:(e,r,t)=>{var n=t(67294),s=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d={key:!0,ref:!0,__self:!0,__source:!0};function l(e,r,t){var n,a={},l=null,p=null;for(n in void 0!==t&&(l=""+t),void 0!==r.key&&(l=""+r.key),void 0!==r.ref&&(p=r.ref),r)i.call(r,n)&&!d.hasOwnProperty(n)&&(a[n]=r[n]);if(e&&e.defaultProps)for(n in r=e.defaultProps)void 0===a[n]&&(a[n]=r[n]);return{$$typeof:s,type:e,key:l,ref:p,props:a,_owner:o.current}}r.Fragment=a,r.jsx=l,r.jsxs=l},85893:(e,r,t)=>{e.exports=t(75251)},11151:(e,r,t)=>{t.d(r,{Z:()=>o,a:()=>i});var n=t(67294);const s={},a=n.createContext(s);function i(e){const r=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(a.Provider,{value:r},e.children)}}}]);