puppeteer/assets/js/3816f9b5.f5486051.js

1 line
8.5 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[8070],{3905:function(e,t,r){r.d(t,{Zo:function(){return i},kt:function(){return k}});var a=r(67294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},p=Object.keys(e);for(a=0;a<p.length;a++)r=p[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(e);for(a=0;a<p.length;a++)r=p[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var d=a.createContext({}),u=function(e){var t=a.useContext(d),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},i=function(e){var t=u(e.components);return a.createElement(d.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},c=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,p=e.originalType,d=e.parentName,i=l(e,["components","mdxType","originalType","parentName"]),c=u(r),k=n,y=c["".concat(d,".").concat(k)]||c[k]||s[k]||p;return r?a.createElement(y,o(o({ref:t},i),{},{components:r})):a.createElement(y,o({ref:t},i))}));function k(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var p=r.length,o=new Array(p);o[0]=c;var l={};for(var d in t)hasOwnProperty.call(t,d)&&(l[d]=t[d]);l.originalType=e,l.mdxType="string"==typeof e?e:n,o[1]=l;for(var u=2;u<p;u++)o[u]=r[u];return a.createElement.apply(null,o)}return a.createElement.apply(null,r)}c.displayName="MDXCreateElement"},75234:function(e,t,r){r.r(t),r.d(t,{frontMatter:function(){return l},contentTitle:function(){return d},metadata:function(){return u},toc:function(){return i},default:function(){return c}});var a=r(87462),n=r(63366),p=(r(67294),r(3905)),o=["components"],l={},d=void 0,u={unversionedId:"puppeteer.keyboard",id:"puppeteer.keyboard",isDocsHomePage:!1,title:"puppeteer.keyboard",description:"Home &gt; puppeteer &gt; Keyboard",source:"@site/docs/puppeteer.keyboard.md",sourceDirName:".",slug:"/puppeteer.keyboard",permalink:"/puppeteer/docs/next/puppeteer.keyboard",editUrl:"https://github.com/facebook/puppeteer/edit/main/website/docs/puppeteer.keyboard.md",version:"current",frontMatter:{},sidebar:"docs",previous:{title:"puppeteer.accessibility.snapshot",permalink:"/puppeteer/docs/next/puppeteer.accessibility.snapshot"},next:{title:"puppeteer.keyboard.down",permalink:"/puppeteer/docs/next/puppeteer.keyboard.down"}},i=[{value:"Keyboard class",id:"keyboard-class",children:[]},{value:"Remarks",id:"remarks",children:[]},{value:"Example 1",id:"example-1",children:[]},{value:"Example 2",id:"example-2",children:[]},{value:"Methods",id:"methods",children:[]}],s={toc:i};function c(e){var t=e.components,r=(0,n.Z)(e,o);return(0,p.kt)("wrapper",(0,a.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,p.kt)("p",null,(0,p.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/index"},"Home")," ",">"," ",(0,p.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/puppeteer"},"puppeteer")," ",">"," ",(0,p.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/puppeteer.keyboard"},"Keyboard")),(0,p.kt)("h2",{id:"keyboard-class"},"Keyboard class"),(0,p.kt)("p",null,"Keyboard provides an api for managing a virtual keyboard. The high level api is ",(0,p.kt)("a",{parentName:"p",href:"/puppeteer/docs/next/puppeteer.keyboard.type"},"Keyboard.type()"),", which takes raw characters