"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[64249],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>c});varr=n(67294);functiona(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}functionp(e,t){varn=Object.keys(e);if(Object.getOwnPropertySymbols){varr=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}returnn}functionl(e){for(vart=1;t<arguments.length;t++){varn=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}returne}functioni(e,t){if(null==e)return{};varn,r,a=function(e,t){if(null==e)return{};varn,r,a={},p=Object.keys(e);for(r=0;r<p.length;r++)n=p[r],t.indexOf(n)>=0||(a[n]=e[n]);returna}(e,t);if(Object.getOwnPropertySymbols){varp=Object.getOwnPropertySymbols(e);for(r=0;r<p.length;r++)n=p[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}returna}varo=r.createContext({}),s=function(e){vart=r.useContext(o),n=t;returne&&(n="function"==typeofe?e(t):l(l({},t),e)),n},u=function(e){vart=s(e.components);returnr.createElement(o.Provider,{value:t},e.children)},d={inlineCode:"code",wrapper:function(e){vart=e.children;returnr.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){varn=e.components,a=e.mdxType,p=e.originalType,o=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),m=s(n),c=a,k=m["".concat(o,".").concat(c)]||m[c]||d[c]||p;returnn?r.createElement(k,l(l({ref:t},u),{},{components:n})):r.createElement(k,l({ref:t},u))}));functionc(e,t){varn=arguments,a=t&&t.mdxType;if("string"==typeofe||a){varp=n.length,l=newArray(p);l[0]=m;vari={};for(varoint)hasOwnProperty.call(t,o)&&(i[o]=t[o]);i.originalType=e,i.mdxType="string"==typeofe?e:a,l[1]=i;for(vars=2;s<p;s++)l[s]=n[s];returnr.createElement.apply(null,l)}returnr.createElement.apply(null,n)}m.displayName="MDXCreateElement"},79845:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>d,frontMatter:()=>p,metadata:()=>i,toc:()=>s});varr=n(87462),a=(n(67294),n(3905));constp={},l="ElementHandle.press() method",i={unversionedId:"api/puppeteer.elementhandle.press",id:"api/puppeteer.elementhandle.press",title:"ElementHandle.press() method",description:"Focuses the element, and then uses Keyboard.down() and Keyboard.up().",source:"@site/../docs/api/puppeteer.elementhandle.press.md",sourceDirName:"api",slug:"/api/puppeteer.elementhandle.press",permalink:"/puppeteer/api/puppeteer.elementhandle.press",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"sidebar",previous:{title:"ElementHandle.isIntersectingViewport() method",permalink:"/puppeteer/api/puppeteer.elementhandle.isintersectingviewport"},next:{title:"ElementHandle.screenshot() method",permalink:"/puppeteer/api/puppeteer.elementhandle.screenshot"}},o={},s=[{value:"Parameters",id:"parameters",level:2},{value:"Remarks",id:"remarks",level:2}],u={toc:s};functiond(e){let{components:t,...n}=e;return(0,a.kt)("wrapper",(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"elementhandlepress-method"},"ElementHandle.press() method"),(0,a.kt)("p",null,"Focuses the element, and then uses ",(0,a.kt)("a",{parentName:"p",href:"/puppeteer/api/puppeteer.keyboard.down"},"Keyboard.down()")," and ",(0,a.kt)("a",{parentName:"p",href:"/puppeteer/api/puppeteer.keyboard.up"},"Keyboard.up()"),"."),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"Signature:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-typescript"},"press(key: KeyInput, options?: PressOptions): Promise<void>;\n")),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Parameter"),(0,a.kt)("th",