1"use strict";(self.webpackChunkplaywright_dev=self.webpackChunkplaywright_dev||[]).push([["1899"],{93911(e,i,n){n.r(i),n.d(i,{metadata:()=>s,default:()=>h,frontMatter:()=>l,contentTitle:()=>t,toc:()=>o,assets:()=>c});var s=JSON.parse('{"id":"api/class-androiddevice","title":"AndroidDevice","description":"AndroidDevice] represents a connected device, either real hardware or emulated. Devices can be obtained using [android.devices().","source":"@site/versioned_docs/version-stable/api/class-androiddevice.mdx","sourceDirName":"api","slug":"/api/class-androiddevice","permalink":"/docs/api/class-androiddevice","draft":false,"unlisted":false,"tags":[],"version":"stable","frontMatter":{"id":"class-androiddevice","title":"AndroidDevice"},"sidebar":"api","previous":{"title":"Android","permalink":"/docs/api/class-android"},"next":{"title":"AndroidInput","permalink":"/docs/api/class-androidinput"}}'),r=n(74848),d=n(28453);n(13554),n(41647),n(83137);let l={id:"class-androiddevice",title:"AndroidDevice"},t,c={},o=[{value:"Methods",id:"methods",level:2},{value:"close",id:"android-device-close",level:3},{value:"drag",id:"android-device-drag",level:3},{value:"fill",id:"android-device-fill",level:3},{value:"fling",id:"android-device-fling",level:3},{value:"info",id:"android-device-info",level:3},{value:"installApk",id:"android-device-install-apk",level:3},{value:"launchBrowser",id:"android-device-launch-browser",level:3},{value:"longTap",id:"android-device-long-tap",level:3},{value:"model",id:"android-device-model",level:3},{value:"open",id:"android-device-open",level:3},{value:"pinchClose",id:"android-device-pinch-close",level:3},{value:"pinchOpen",id:"android-device-pinch-open",level:3},{value:"press",id:"android-device-press",level:3},{value:"push",id:"android-device-push",level:3},{value:"screenshot",id:"android-device-screenshot",level:3},{value:"scroll",id:"android-device-scroll",level:3},{value:"serial",id:"android-device-serial",level:3},{value:"setDefaultTimeout",id:"android-device-set-default-timeout",level:3},{value:"shell",id:"android-device-shell",level:3},{value:"swipe",id:"android-device-swipe",level:3},{value:"tap",id:"android-device-tap",level:3},{value:"wait",id:"android-device-wait",level:3},{value:"waitForEvent",id:"android-device-wait-for-event",level:3},{value:"webView",id:"android-device-web-view",level:3},{value:"webViews",id:"android-device-web-views",level:3},{value:"Properties",id:"properties",level:2},{value:"input",id:"android-device-input",level:3},{value:"Events",id:"events",level:2},{value:"on('close')",id:"android-device-event-close",level:3},{value:"on('webview')",id:"android-device-event-web-view",level:3}];function a(e){let i={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice",title:"AndroidDevice",children:"AndroidDevice"})," represents a connected device, either real hardware or emulated. Devices can be obtained using ",(0,r.jsx)(i.a,{href:"/docs/api/class-android#android-devices",children:"android.devices()"}),"."]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"methods",children:"Methods"}),"\n",(0,r.jsx)(i.h3,{id:"android-device-close",children:"close"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.close"}),"\n",(0,r.jsx)(i.p,{children:"Disconnects from the device."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.close();\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-close-return"}),(0,r.jsx)("a",{href:"#android-device-close-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-drag",children:"drag"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.drag"}),"\n",(0,r.jsxs)(i.p,{children:["Drags the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-drag-option-selector",children:"selector"})," towards ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-drag-option-dest",children:"dest"})," point."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.drag(selector, dest);\nawait androidDevice.drag(selector, dest, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-drag-option-selector"}),(0,r.jsx)("a",{href:"#android-device-drag-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to drag."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"dest"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-drag-option-dest"}),(0,r.jsx)("a",{href:"#android-device-drag-option-dest",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"x"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"y"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:"Point to drag to."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"speed"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-drag-option-speed"}),(0,r.jsx)("a",{href:"#android-device-drag-option-speed",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional speed of the drag in pixels per second."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-drag-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-drag-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-drag-return"}),(0,r.jsx)("a",{href:"#android-device-drag-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-fill",children:"fill"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.fill"}),"\n",(0,r.jsxs)(i.p,{children:["Fills the specific ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-fill-option-selector",children:"selector"})," input box with ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-fill-option-text",children:"text"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.fill(selector, text);\nawait androidDevice.fill(selector, text, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fill-option-selector"}),(0,r.jsx)("a",{href:"#android-device-fill-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to fill."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"text"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fill-option-text"}),(0,r.jsx)("a",{href:"#android-device-fill-option-text",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Text to be filled in the input box."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fill-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-fill-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fill-return"}),(0,r.jsx)("a",{href:"#android-device-fill-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-fling",children:"fling"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.fling"}),"\n",(0,r.jsxs)(i.p,{children:["Flings the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-fling-option-selector",children:"selector"})," in the specified ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-fling-option-direction",children:"direction"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.fling(selector, direction);\nawait androidDevice.fling(selector, direction, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fling-option-selector"}),(0,r.jsx)("a",{href:"#android-device-fling-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to fling."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"direction"}),' "down" | "up" | "left" | "right"',(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fling-option-direction"}),(0,r.jsx)("a",{href:"#android-device-fling-option-direction",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Fling direction."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"speed"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fling-option-speed"}),(0,r.jsx)("a",{href:"#android-device-fling-option-speed",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional speed of the fling in pixels per second."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fling-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-fling-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-fling-return"}),(0,r.jsx)("a",{href:"#android-device-fling-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-info",children:"info"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.info"}),"\n",(0,r.jsxs)(i.p,{children:["Returns information about a widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-info-option-selector",children:"selector"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.info(selector);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-info-option-selector"}),(0,r.jsx)("a",{href:"#android-device-info-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to return information about."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<[AndroidElementInfo]>",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-info-return"}),(0,r.jsx)("a",{href:"#android-device-info-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-install-apk",children:"installApk"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.installApk"}),"\n",(0,r.jsx)(i.p,{children:"Installs an apk on the device."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.installApk(file);\nawait androidDevice.installApk(file, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"file"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," | ",(0,r.jsx)(i.a,{href:"https://nodejs.org/api/buffer.html#buffer_class_buffer",title:"Buffer",children:"Buffer"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-install-apk-option-file"}),(0,r.jsx)("a",{href:"#android-device-install-apk-option-file",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Either a path to the apk file, or apk file content."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"args"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",title:"Array",children:"Array"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),"> ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-install-apk-option-args"}),(0,r.jsx)("a",{href:"#android-device-install-apk-option-args",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Optional arguments to pass to the ",(0,r.jsx)(i.code,{children:"shell:cmd package install"})," call. Defaults to ",(0,r.jsx)(i.code,{children:"-r -t -S"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-install-apk-return"}),(0,r.jsx)("a",{href:"#android-device-install-apk-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-launch-browser",children:"launchBrowser"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.launchBrowser"}),"\n",(0,r.jsx)(i.p,{children:"Launches Chrome browser on the device, and returns its persistent context."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.launchBrowser();\nawait androidDevice.launchBrowser(options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"acceptDownloads"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-accept-downloads"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-accept-downloads",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Whether to automatically download all the attachments. Defaults to ",(0,r.jsx)(i.co
1de,{children:"true"})," where all the downloads are accepted."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"args"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",title:"Array",children:"Array"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),"> ",(0,r.jsx)(i.em,{children:"(optional)"})," ",(0,r.jsx)("font",{size:"2",children:"Added in: v1.29"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-args"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-args",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.admonition,{type:"warning",children:(0,r.jsx)(i.p,{children:"Use custom browser args at your own risk, as some of them may break Playwright functionality."})}),"\n",(0,r.jsxs)(i.p,{children:["Additional arguments to pass to the browser instance. The list of Chromium flags can be found ",(0,r.jsx)(i.a,{href:"https://peter.sh/experiments/chromium-command-line-switches/",children:"here"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"baseURL"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-base-url"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-base-url",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["When using ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-goto",children:"page.goto()"}),", ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-route",children:"page.route()"}),", ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-wait-for-url",children:"page.waitForURL()"}),", ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-wait-for-request",children:"page.waitForRequest()"}),", or ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-wait-for-response",children:"page.waitForResponse()"})," it takes the base URL in consideration by using the ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/URL/URL",children:(0,r.jsx)(i.code,{children:"URL()"})})," constructor for building the corresponding URL. Unset by default. Examples:"]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["baseURL: ",(0,r.jsx)(i.code,{children:"http://localhost:3000"})," and navigating to ",(0,r.jsx)(i.code,{children:"/bar.html"})," results in ",(0,r.jsx)(i.code,{children:"http://localhost:3000/bar.html"})]}),"\n",(0,r.jsxs)(i.li,{children:["baseURL: ",(0,r.jsx)(i.code,{children:"http://localhost:3000/foo/"})," and navigating to ",(0,r.jsx)(i.code,{children:"./bar.html"})," results in ",(0,r.jsx)(i.code,{children:"http://localhost:3000/foo/bar.html"})]}),"\n",(0,r.jsxs)(i.li,{children:["baseURL: ",(0,r.jsx)(i.code,{children:"http://localhost:3000/foo"})," (without trailing slash) and navigating to ",(0,r.jsx)(i.code,{children:"./bar.html"})," results in ",(0,r.jsx)(i.code,{children:"http://localhost:3000/bar.html"})]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"bypassCSP"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-bypass-csp"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-bypass-csp",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Toggles bypassing page's Content-Security-Policy. Defaults to ",(0,r.jsx)(i.code,{children:"false"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"colorScheme"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",title:"null",children:"null"}),' | "light" | "dark" | "no-preference" ',(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-color-scheme"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-color-scheme",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Emulates ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme",children:"prefers-colors-scheme"})," media feature, supported values are ",(0,r.jsx)(i.code,{children:"'light'"})," and ",(0,r.jsx)(i.code,{children:"'dark'"}),". See ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"})," for more details. Passing ",(0,r.jsx)(i.code,{children:"null"})," resets emulation to system defaults. Defaults to ",(0,r.jsx)(i.code,{children:"'light'"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"contrast"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",title:"null",children:"null"}),' | "no-preference" | "more" ',(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-contrast"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-contrast",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Emulates ",(0,r.jsx)(i.code,{children:"'prefers-contrast'"})," media feature, supported values are ",(0,r.jsx)(i.code,{children:"'no-preference'"}),", ",(0,r.jsx)(i.code,{children:"'more'"}),". See ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"})," for more details. Passing ",(0,r.jsx)(i.code,{children:"null"})," resets emulation to system defaults. Defaults to ",(0,r.jsx)(i.code,{children:"'no-preference'"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"deviceScaleFactor"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-device-scale-factor"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-device-scale-factor",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Specify device scale factor (can be thought of as dpr). Defaults to ",(0,r.jsx)(i.code,{children:"1"}),". Learn more about ",(0,r.jsx)(i.a,{href:"/docs/emulation#devices",children:"emulating devices with device scale factor"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"extraHTTPHeaders"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),", ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),"> ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-extra-http-headers"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-extra-http-headers",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"An object containing additional HTTP headers to be sent with every request. Defaults to none."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"forcedColors"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",title:"null",children:"null"}),' | "active" | "none" ',(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-forced-colors"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-forced-colors",class:"list-anchor",children:"#"})]}
1),"\n",(0,r.jsxs)(i.p,{children:["Emulates ",(0,r.jsx)(i.code,{children:"'forced-colors'"})," media feature, supported values are ",(0,r.jsx)(i.code,{children:"'active'"}),", ",(0,r.jsx)(i.code,{children:"'none'"}),". See ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"})," for more details. Passing ",(0,r.jsx)(i.code,{children:"null"})," resets emulation to system defaults. Defaults to ",(0,r.jsx)(i.code,{children:"'none'"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"geolocation"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-geolocation"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-geolocation",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"latitude"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"Latitude between -90 and 90."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"longitude"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"Longitude between -180 and 180."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"accuracy"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Non-negative accuracy value. Defaults to ",(0,r.jsx)(i.code,{children:"0"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"hasTouch"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-has-touch"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-has-touch",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Specifies if viewport supports touch events. Defaults to false. Learn more about ",(0,r.jsx)(i.a,{href:"/docs/emulation#devices",children:"mobile emulation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"httpCredentials"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," | ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",title:"Array",children:"Array"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"}),"> ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-http-credentials"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-http-credentials",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"username"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"password"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"origin"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Restrain sending http credentials on specific origin (scheme://host",":port",")."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"send"}),' "unauthorized" | "always" ',(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["This option only applies to the requests sent from corresponding ",(0,r.jsx)(i.a,{href:"/docs/api/class-apirequestcontext",title:"APIRequestContext",children:"APIRequestContext"})," and does not affect requests sent from the browser. ",(0,r.jsx)(i.code,{children:"'always'"})," - ",(0,r.jsx)(i.code,{children:"Authorization"})," header with basic authentication credentials will be sent with the each API request. ",(0,r.jsx)(i.code,{children:"'unauthorized"})," - the credentials are only sent when 401 (Unauthorized) response with ",(0,r.jsx)(i.code,{children:"WWW-Authenticate"})," header is received. Defaults to ",(0,r.jsx)(i.code,{children:"'unauthorized'"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Credentials for ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication",children:"HTTP authentication"}),". If no origin is specified, the username and password are sent to any servers upon unauthorized responses."]}),"\n",(0,r.jsx)(i.p,{children:"Pass an array to use different credentials for different origins. The first entry that matches the request origin
1is used, and entries with no origin match any request."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"ignoreHTTPSErrors"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-ignore-https-errors"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-ignore-https-errors",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Whether to ignore HTTPS errors when sending network requests. Defaults to ",(0,r.jsx)(i.code,{children:"false"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"isMobile"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-is-mobile"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-is-mobile",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Whether the ",(0,r.jsx)(i.code,{children:"meta viewport"})," tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to ",(0,r.jsx)(i.code,{children:"false"})," and is not supported in Firefox. Learn more about ",(0,r.jsx)(i.a,{href:"/docs/emulation#ismobile",children:"mobile emulation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"javaScriptEnabled"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-java-script-enabled"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-java-script-enabled",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Whether or not to enable JavaScript in the context. Defaults to ",(0,r.jsx)(i.code,{children:"true"}),". Learn more about ",(0,r.jsx)(i.a,{href:"/docs/emulation#javascript-enabled",children:"disabling JavaScript"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"locale"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-locale"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-locale",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Specify user locale, for example ",(0,r.jsx)(i.code,{children:"en-GB"}),", ",(0,r.jsx)(i.code,{children:"de-DE"}),", etc. Locale will affect ",(0,r.jsx)(i.code,{children:"navigator.language"})," value, ",(0,r.jsx)(i.code,{children:"Accept-Language"})," request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our ",(0,r.jsx)(i.a,{href:"/docs/emulation#locale--timezone",children:"emulation guide"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"logger"})," ",(0,r.jsx)(i.a,{href:"/docs/api/class-logger",title:"Logger",children:"Logger"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-logger"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-logger",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.admonition,{title:"Deprecated",type:"warning",children:(0,r.jsx)(i.p,{children:"The logs received by the logger are incomplete. Please use tracing instead."})}),"\n",(0,r.jsx)(i.p,{children:"Logger sink for Playwright logging."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"offline"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-offline"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-offline",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Whether to emulate network being offline. Defaults to ",(0,r.jsx)(i.code,{children:"false"}),". Learn more about ",(0,r.jsx)(i.a,{href:"/docs/emulation#offline",children:"network emulation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"permissions"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",title:"Array",children:"Array"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),"> ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-permissions"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-permissions",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["A list of permissions to grant to all pages in this context. See ",(0,r.jsx)(i.a,{href:"/docs/api/class-browsercontext#browser-context-grant-permissions",children:"browserContext.grantPermissions()"})," for more details. Defaults to none."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"pkg"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-pkg"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-pkg",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional package name to launch instead of default Chrome for Android."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"proxy"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})," ",(0,r.jsx)("font",{size:"2",children:"Added in: v1.29"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-proxy"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-proxy",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"server"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})]}),"\n",(0,r.jsxs)(i.p,{children:["Proxy to be used for all requests. HTTP and SOCKS proxies are supported, for example ",(0,r.jsx)(i.code,{children:"http://myproxy.com:3128"})," or ",(0,r.jsx)(i.code,{children:"socks5://myproxy.com:3128"}),". Short form ",(0,r.jsx)(i.code,{children:"myproxy.com:3128"})," is considered an HTTP proxy."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"bypass"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Optional comma-separated domains to bypass proxy, for example ",(0,r.jsx)(i.code,{children:'".com, chromium.org, .domain.com"'}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"username"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional username to use if HTTP proxy requires authentication."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"password"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional password to use if HTTP proxy requires authentication."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:"Network proxy settings."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"recordHar"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-record-har"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-record-har",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"omitContent"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Optional setting to control whether to omit request content from the HAR. Defaults to ",(0,r.jsx)(i.code,{children:"false"}),". Deprecated, use ",(0,r.jsx)(i.code,{children:"content"})," policy instead."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"content"}),' "omit" | "embed" | "attach" ',(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Optional setting to control resource content management. If ",(0,r.jsx)(i.code,{children:"omit"})," is specified, content is not persisted. If ",(0,r.jsx)(i.code,{children:"attach"})," is specified, resources are persisted as separate files or entries in the ZIP archive. If ",(0,r.jsx)(i.code,{children:"embed"})," is specified, content is stored inline the HAR file as per HAR specification. Defaults to ",(0,r.jsx)(i.code,{children:"attach"})," for ",(0,r.jsx)(i.code,{children:".zip"})," output files and to ",(0,r.jsx)(i.code,{children:"embed"})," for all other file extensions."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"path"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})]}),"\n",(0,r.jsxs)(i.p,{children:["Path on the filesystem to write the HAR file to. If the file name ends with ",(0,r.jsx)(i.code,{children:".zip"}),", ",(0,r.jsx)(i.code,{children:"content: 'attach'"})," is used by default."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"mode"}),' "full" | "minimal" ',(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["When set to ",(0,r.jsx)(i.code,{children:"minimal"}),", only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to ",(0,r.jsx)(i.code,{children:"full"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"urlFilter"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," | ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp",title:"RegExp",children:"RegExp"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["A glob or regex pattern to filter requests that are stored in the HAR. When a ",(0,r.jsx)(i.a,{href:"/docs/api/class-browser#browser-new-context-option-base-url",children:"baseURL"})," via the context options was provided and the passed URL is a path, it gets merged via the ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/URL/URL",children:(0,r.jsx)(i.co
1de,{children:"new URL()"})})," constructor. Defaults to none."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Enables ",(0,r.jsx)(i.a,{href:"http://www.softwareishard.com/blog/har-12-spec",children:"HAR"})," recording for all pages into ",(0,r.jsx)(i.code,{children:"recordHar.path"})," file. If not specified, the HAR is not recorded. Make sure to await ",(0,r.jsx)(i.a,{href:"/docs/api/class-browsercontext#browser-context-close",children:"browserContext.close()"})," for the HAR to be saved."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"recordVideo"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-record-video"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-record-video",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"dir"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Path to the directory to put videos into. If not specified, the videos will be stored in ",(0,r.jsx)(i.code,{children:"artifactsDir"})," (see ",(0,r.jsx)(i.a,{href:"/docs/api/class-browsertype#browser-type-launch",children:"browserType.launch()"})," options)."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"size"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"width"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"Video frame width."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"height"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"Video frame height."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Optional dimensions of the recorded videos. If not specified the size will be equal to ",(0,r.jsx)(i.code,{children:"viewport"})," scaled down to fit into 800x800. If ",(0,r.jsx)(i.code,{children:"viewport"})," is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"showActions"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"duration"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["How long each annotation is displayed in milliseconds. Defaults to ",(0,r.jsx)(i.code,{children:"500"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"position"}),' "top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right" ',(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Position of the action title overlay. Defaults to ",(0,r.jsx)(i.co
1de,{children:'"top-right"'}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"fontSize"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Font size of the action title in pixels. Defaults to ",(0,r.jsx)(i.code,{children:"24"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"cursor"}),' "none" | "pointer" ',(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["Cursor decoration shown for pointer actions. ",(0,r.jsx)(i.code,{children:'"pointer"'})," (the default) renders a mouse pointer that animates from the previous action point to the next one. ",(0,r.jsx)(i.code,{children:'"none"'})," disables the cursor decoration."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:"If specified, enables visual annotations on interacted elements during video recording."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Enables video recording for all pages into ",(0,r.jsx)(i.code,{children:"recordVideo.dir"})," directory. If not specified videos are not recorded. Make sure to await ",(0,r.jsx)(i.a,{href:"/docs/api/class-browsercontext#browser-context-close",children:"browserContext.close()"})," for videos to be saved."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"reducedMotion"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",title:"null",children:"null"}),' | "reduce" | "no-preference" ',(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-reduced-motion"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-reduced-motion",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Emulates ",(0,r.jsx)(i.code,{children:"'prefers-reduced-motion'"})," media feature, supported values are ",(0,r.jsx)(i.code,{children:"'reduce'"}),", ",(0,r.jsx)(i.code,{children:"'no-preference'"}),". See ",(0,r.jsx)(i.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"})," for more details. Passing ",(0,r.jsx)(i.code,{children:"null"})," resets emulation to system defaults. Defaults to ",(0,r.jsx)(i.code,{children:"'no-preference'"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"screen"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-screen"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-screen",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"width"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"page width in pixels."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"height"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"page height in pixels."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Emulates consistent window screen size available inside web page via ",(0,r.jsx)(i.code,{children:"window.screen"}),". Is only used when the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-launch-browser-option-viewport",children:"viewport"})," is set."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"serviceWorkers"}),' "allow" | "block" ',(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-service-workers"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-service-workers",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Whether to allow sites to register Service workers. Defaults to ",(0,r.jsx)(i.code,{children:"'allow'"}),"."]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"'allow'"}),": ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API",children:"Service Workers"})," can be registered."]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"'block'"}),": Playwright will block all registration of Service Workers."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"strictSelectors"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type",title:"Boolean",children:"boolean"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-strict-selectors"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-strict-selectors",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors that imply single target DOM element will throw when more than one element matches the selector. This option does not affect any Locator APIs (Locators are always strict). Defaults to ",(0,r.jsx)(i.code,{children:"false"}),". See ",(0,r.jsx)(i.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"})," to learn more about the strict mode."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timezoneId"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-timezone-id"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-timezone-id",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Changes the timezone of the context. See ",(0,r.jsx)(i.a,{href:"https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1",children:"ICU's metaZones.txt"})," for a list of supported timezone IDs. Defaults to the system timezone."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"userAgent"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-user-agent"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-user-agent",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Specific user agent to use in this context."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"viewport"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null",title:"null",children:"null"})," | ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-option-viewport"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-option-viewport",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"width"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"page width in pixels."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"height"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})]}),"\n",(0,r.jsx)(i.p,{children:"page height in pixels."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use ",(0,r.jsx)(i.code,{children:"null"})," to disable the consistent viewport emulation. Learn more about ",(0,r.jsx)(i.a,{href:"../emulation#viewport",children:"viewport emulation"}),"."]}),"\n",(0,r.jsx)(i.admonition,{type:"note",children:(0,r.jsxs)(i.p,{children:["The ",(0,r.jsx)(i.code,{children:"null"})," value opts out from the default presets, makes viewport depend on the host window size defined by the operating system. It makes the execution of the tests non-deterministic."]})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"/docs/api/class-browsercontext",title:"BrowserContext",children:"BrowserContext"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-launch-browser-return"}),(0,r.jsx)("a",{href:"#android-device-launch-browser-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-long-tap",children:"longTap"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.longTap"}),"\n",(0,r.jsxs)(i.p,{children:["Performs a long tap on the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-long-tap-option-selector",children:"selector"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.longTap(selector);\nawait androidDevice.longTap(selector, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-long-tap-option-selector"}),(0,r.jsx)("a",{href:"#android-device-long-tap-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to tap on."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-long-tap-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-long-tap-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-long-tap-return"}),(0,r.jsx)("a",{href:"#android-device-long-tap-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-model",children:"model"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.model"}),"\n",(0,r.jsx)(i.p,{children:"Device model."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.model();\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-model-return"}),(0,r.jsx)("a",{href:"#android-device-model-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-open",children:"open"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.open"}),"\n",(0,r.jsx)(i.p,{children:"Launches a process in the shell on the device and returns a socket to communicate with the launched process."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.open(command);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"command"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-open-option-command"}),(0,r.jsx)("a",{href:"#android-device-open-option-command",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Shell command to execute."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"/docs/api/class-androidsocket",title:"AndroidSocket",children:"AndroidSocket"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-open-return"}),(0,r.jsx)("a",{href:"#android-device-open-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-pinch-close",children:"pinchClose"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.pinchClose"}),"\n",(0,r.jsxs)(i.p,{children:["Pinches the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-pinch-close-option-selector",children:"selector"})," in the closing direction."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.pinchClose(selector, percent);\nawait androidDevice.pinchClose(selector, percent, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-close-option-selector"}),(0,r.jsx)("a",{href:"#android-device-pinch-close-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to pinch close."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"percent"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-close-option-percent"}),(0,r.jsx)("a",{href:"#android-device-pinch-close-option-percent",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"The size of the pinch as a percentage of the widget's size."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"speed"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-close-option-speed"}),(0,r.jsx)("a",{href:"#android-device-pinch-close-option-speed",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional speed of the pinch in pixels per second."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-close-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-pinch-close-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-close-return"}),(0,r.jsx)("a",{href:"#android-device-pinch-close-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-pinch-open",children:"pinchOpen"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.pinchOpen"}),"\n",(0,r.jsxs)(i.p,{children:["Pinches the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-pinch-open-option-selector",children:"selector"})," in the open direction."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.pinchOpen(selector, percent);\nawait androidDevice.pinchOpen(selector, percent, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-open-option-selector"}),(0,r.jsx)("a",{href:"#android-device-pinch-open-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to pinch open."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"percent"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-open-option-percent"}),(0,r.jsx)("a",{href:"#android-device-pinch-open-option-percent",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"The size of the pinch as a percentage of the widget's size."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"speed"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-open-option-speed"}),(0,r.jsx)("a",{href:"#android-device-pinch-open-option-speed",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional speed of the pinch in pixels per second."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-open-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-pinch-open-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-pinch-open-return"}),(0,r.jsx)("a",{href:"#android-device-pinch-open-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-press",children:"press"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.press"}),"\n",(0,r.jsxs)(i.p,{children:["Presses the specific ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-press-option-key",children:"key"})," in the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-press-option-selector",children:"selector"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.press(selector, key);\nawait androidDevice.press(selector, key, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-press-option-selector"}),(0,r.jsx)("a",{href:"#android-device-press-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to press the key in."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"key"})," [AndroidKey]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-press-option-key"}),(0,r.jsx)("a",{href:"#android-device-press-option-key",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"The key to press."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-press-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-press-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-press-return"}),(0,r.jsx)("a",{href:"#android-device-press-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-push",children:"push"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.push"}),"\n",(0,r.jsx)(i.p,{children:"Copies a file to the device."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.push(file, path);\nawait androidDevice.push(file, path, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"file"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," | ",(0,r.jsx)(i.a,{href:"https://nodejs.org/api/buffer.html#buffer_class_buffer",title:"Buffer",children:"Buffer"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-push-option-file"}),(0,r.jsx)("a",{href:"#android-device-push-option-file",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Either a path to the file, or file content."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"path"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-push-option-path"}),(0,r.jsx)("a",{href:"#android-device-push-option-path",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Path to the file on the device."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"mode"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-push-option-mode"}),(0,r.jsx)("a",{href:"#android-device-push-option-mode",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Optional file mode, defaults to ",(0,r.jsx)(i.co
1de,{children:"644"})," (",(0,r.jsx)(i.code,{children:"rw-r--r--"}),")."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-push-return"}),(0,r.jsx)("a",{href:"#android-device-push-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-screenshot",children:"screenshot"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.screenshot"}),"\n",(0,r.jsx)(i.p,{children:"Returns the buffer with the captured screenshot of the device."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.screenshot();\nawait androidDevice.screenshot(options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"path"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-screenshot-option-path"}),(0,r.jsx)("a",{href:"#android-device-screenshot-option-path",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["The file path to save the image to. If ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-screenshot-option-path",children:"path"})," is a relative path, then it is resolved relative to the current working directory. If no path is provided, the image won't be saved to the disk."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://nodejs.org/api/buffer.html#buffer_class_buffer",title:"Buffer",children:"Buffer"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-screenshot-return"}),(0,r.jsx)("a",{href:"#android-device-screenshot-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-scroll",children:"scroll"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.scroll"}),"\n",(0,r.jsxs)(i.p,{children:["Scrolls the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-scroll-option-selector",children:"selector"})," in the specified ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-scroll-option-direction",children:"direction"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.scroll(selector, direction, percent);\nawait androidDevice.scroll(selector, direction, percent, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-scroll-option-selector"}),(0,r.jsx)("a",{href:"#android-device-scroll-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to scroll."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"direction"}),' "down" | "up" | "left" | "right"',(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-scroll-option-direction"}),(0,r.jsx)("a",{href:"#android-device-scroll-option-direction",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Scroll direction."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"percent"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-scroll-option-percent"}),(0,r.jsx)("a",{href:"#android-device-scroll-option-percent",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Distance to scroll as a percentage of the widget's size."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"speed"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-scroll-option-speed"}),(0,r.jsx)("a",{href:"#android-device-scroll-option-speed",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional speed of the scroll in pixels per second."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-scroll-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-scroll-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-scroll-return"}),(0,r.jsx)("a",{href:"#android-device-scroll-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-serial",children:"serial"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.serial"}),"\n",(0,r.jsx)(i.p,{children:"Device serial number."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.serial();\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-serial-return"}),(0,r.jsx)("a",{href:"#android-device-serial-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-set-default-timeout",children:"setDefaultTimeout"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.setDefaultTimeout"}),"\n",(0,r.jsxs)(i.p,{children:["This setting will change the default maximum time for all the methods accepting ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout-option-timeout",children:"timeout"})," option."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.setDefaultTimeout(timeout);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-set-default-timeout-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-set-default-timeout-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Maximum time in milliseconds"}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-shell",children:"shell"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.shell"}),"\n",(0,r.jsx)(i.p,{children:"Executes a shell command on the device and returns its output."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.shell(command);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"command"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-shell-option-command"}),(0,r.jsx)("a",{href:"#android-device-shell-option-command",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Shell command to execute."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://nodejs.org/api/buffer.html#buffer_class_buffer",title:"Buffer",children:"Buffer"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-shell-return"}),(0,r.jsx)("a",{href:"#android-device-shell-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-swipe",children:"swipe"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.swipe"}),"\n",(0,r.jsxs)(i.p,{children:["Swipes the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-swipe-option-selector",children:"selector"})," in the specified ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-swipe-option-direction",children:"direction"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.swipe(selector, direction, percent);\nawait androidDevice.swipe(selector, direction, percent, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-swipe-option-selector"}),(0,r.jsx)("a",{href:"#android-device-swipe-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to swipe."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"direction"}),' "down" | "up" | "left" | "right"',(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-swipe-option-direction"}),(0,r.jsx)("a",{href:"#android-device-swipe-option-direction",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Swipe direction."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"percent"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-swipe-option-percent"}),(0,r.jsx)("a",{href:"#android-device-swipe-option-percent",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Distance to swipe as a percentage of the widget's size."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"speed"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-swipe-option-speed"}),(0,r.jsx)("a",{href:"#android-device-swipe-option-speed",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional speed of the swipe in pixels per second."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-swipe-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-swipe-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-swipe-return"}),(0,r.jsx)("a",{href:"#android-device-swipe-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-tap",children:"tap"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.tap"}),"\n",(0,r.jsxs)(i.p,{children:["Taps on the widget defined by ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-tap-option-selector",children:"selector"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}
1),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.tap(selector);\nawait androidDevice.tap(selector, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-tap-option-selector"}),(0,r.jsx)("a",{href:"#android-device-tap-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to tap on."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"duration"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-tap-option-duration"}),(0,r.jsx)("a",{href:"#android-device-tap-option-duration",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional duration of the tap in milliseconds."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-tap-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-tap-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-tap-return"}),(0,r.jsx)("a",{href:"#android-device-tap-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-wait",children:"wait"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.wait"}),"\n",(0,r.jsxs)(i.p,{children:["Waits for the specific ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-wait-option-selector",children:"selector"})," to either appear or disappear, depending on the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-wait-option-state",children:"state"}),"."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.wait(selector);\nawait androidDevice.wait(selector, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"selector"})," [AndroidSelector]",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-option-selector"}),(0,r.jsx)("a",{href:"#android-device-wait-option-selector",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Selector to wait for."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"state"}),' "gone" ',(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-option-state"}),(0,r.jsx)("a",{href:"#android-device-wait-option-state",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional state. Can be either:"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsx)(i.li,{children:"default - wait for element to be present."}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"'gone'"})," - wait for element to not be present."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-wait-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined",title:"void",children:"void"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-return"}),(0,r.jsx)("a",{href:"#android-device-wait-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-wait-for-event",children:"waitForEvent"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.waitForEvent"}),"\n",(0,r.jsx)(i.p,{children:"Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy value."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.waitForEvent(event);\nawait androidDevice.waitForEvent(event, optionsOrPredicate);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"event"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-for-event-option-event"}),(0,r.jsx)("a",{href:"#android-device-wait-for-event-option-event",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Event name, same one typically passed into ",(0,r.jsx)(i.co
1de,{children:"*.on(event)"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"optionsOrPredicate"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",title:"Function",children:"function"})," | ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-for-event-option-options-or-predicate"}),(0,r.jsx)("a",{href:"#android-device-wait-for-event-option-options-or-predicate",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"predicate"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function",title:"Function",children:"function"})]}),"\n",(0,r.jsx)(i.p,{children:"receives the event data and resolves to truthy value when the waiting should resolve."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsxs)(i.p,{children:["maximum time to wait for in milliseconds. Defaults to ",(0,r.jsx)(i.code,{children:"30000"})," (30 seconds). Pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:"Either a predicate that receives an event or an options object. Optional."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-wait-for-event-return"}),(0,r.jsx)("a",{href:"#android-device-wait-for-event-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-web-view",children:"webView"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.webView"}),"\n",(0,r.jsxs)(i.p,{children:["This method waits until ",(0,r.jsx)(i.a,{href:"/docs/api/class-androidwebview",title:"AndroidWebView",children:"AndroidWebView"})," matching the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-web-view-option-selector",children:"selector"})," is opened and returns it. If there is already an open ",(0,r.jsx)(i.a,{href:"/docs/api/class-androidwebview",title:"AndroidWebView",children:"AndroidWebView"})," matching the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-web-view-option-selector",children:"selector"}),", returns immediately."]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"await androidDevice.webView(selector);\nawait androidDevice.webView(selector, options);\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Arguments"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"selector"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-web-view-option-selector"}),(0,r.jsx)("a",{href:"#android-device-web-view-option-selector",class:"list-anchor",children:"#"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.co
1de,{children:"pkg"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional Package identifier."}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"socketName"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type",title:"string",children:"string"})," ",(0,r.jsx)(i.em,{children:"(optional)"})]}),"\n",(0,r.jsx)(i.p,{children:"Optional webview socket name."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.code,{children:"options"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object",title:"Object",children:"Object"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:["\n",(0,r.jsxs)(i.p,{children:[(0,r.jsx)(i.code,{children:"timeout"})," ",(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type",title:"Number",children:"number"})," ",(0,r.jsx)(i.em,{children:"(optional)"}),(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-web-view-option-timeout"}),(0,r.jsx)("a",{href:"#android-device-web-view-option-timeout",class:"list-anchor",children:"#"})]}),"\n",(0,r.jsxs)(i.p,{children:["Maximum time in milliseconds, defaults to 30 seconds, pass ",(0,r.jsx)(i.code,{children:"0"})," to disable timeout. The default value can be changed by using the ",(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice#android-device-set-default-timeout",children:"androidDevice.setDefaultTimeout()"})," method."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",title:"Promise",children:"Promise"}),"<",(0,r.jsx)(i.a,{href:"/docs/api/class-androidwebview",title:"AndroidWebView",children:"AndroidWebView"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-web-view-return"}),(0,r.jsx)("a",{href:"#android-device-web-view-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-web-views",children:"webViews"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.webViews"}),"\n",(0,r.jsx)(i.p,{children:"Currently open WebViews."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.webViews();\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Returns"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsxs)(i.li,{children:[(0,r.jsx)(i.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array",title:"Array",children:"Array"}),"<",(0,r.jsx)(i.a,{href:"/docs/api/class-androidwebview",title:"AndroidWebView",children:"AndroidWebView"}),">",(0,r.jsx)("a",{"aria-hidden":"true",tabIndex:"-1",class:"list-anchor-link",id:"android-device-web-views-return"}),(0,r.jsx)("a",{href:"#android-device-web-views-return",class:"list-anchor",children:"#"})]}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"properties",children:"Properties"}),"\n",(0,r.jsx)(i.h3,{id:"android-device-input",children:"input"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.input"}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.input\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Type"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsx)(i.li,{children:(0,r.jsx)(i.a,{href:"/docs/api/class-androidinput",title:"Android
1Input",children:"AndroidInput"})}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"events",children:"Events"}),"\n",(0,r.jsx)(i.h3,{id:"android-device-event-close",children:"on('close')"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.28"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.on('close')"}),"\n",(0,r.jsx)(i.p,{children:"Emitted when the device connection gets closed."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.on('close', data => {});\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Event data"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsx)(i.li,{children:(0,r.jsx)(i.a,{href:"/docs/api/class-androiddevice",title:"AndroidDevice",children:"AndroidDevice"})}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h3,{id:"android-device-event-web-view",children:"on('webview')"}),"\n",(0,r.jsx)("font",{size:"2",style:{position:"relative",top:"-20px"},children:"Added in: v1.9"}),"\n",(0,r.jsx)("x-search",{children:"androidDevice.on('webview')"}),"\n",(0,r.jsx)(i.p,{children:"Emitted when a new WebView instance is detected."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Usage"})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-js",children:"androidDevice.on('webview', data => {});\n"})}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Event data"})}),"\n",(0,r.jsxs)(i.ul,{children:["\n",(0,r.jsx)(i.li,{children:(0,r.jsx)(i.a,{href:"/docs/api/class-androidwebview",title:"AndroidWebView",children:"AndroidWebView"})}),"\n"]})]})}function h(e={}){let{wrapper:i}={...(0,d.R)(),...e.components};return i?(0,r.jsx)(i,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.