/*! For license information please see 1711eb94.e54a0513.js.LICENSE.txt */ "use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[77068],{90055:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>i,default:()=>c,frontMatter:()=>a,metadata:()=>o,toc:()=>d});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/../docs/api/puppeteer.frame._x.md",sourceDirName:"api",slug:"/api/puppeteer.frame._x",permalink:"/next/api/puppeteer.frame._x",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"Frame.$x"},sidebar:"api",previous:{title:"Frame.$eval",permalink:"/next/api/puppeteer.frame._eval"},next:{title:"Frame.addScriptTag",permalink:"/next/api/puppeteer.frame.addscripttag"}},l={},d=[{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:"/next/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>>;\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>>"]})]})}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,l={key:!0,ref:!0,__self:!0,__source:!0};function d(e,r,t){var n,a={},d=null,p=null;for(n in void 0!==t&&(d=""+t),void 0!==r.key&&(d=""+r.key),void 0!==r.ref&&(p=r.ref),r)i.call(r,n)&&!l.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:d,ref:p,props:a,_owner:o.current}}r.Fragment=a,r.jsx=d,r.jsxs=d},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)}}}]);