1"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[12083],{22002:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>l});var s=i(7378);const n={},r=s.createContext(n);function o(e){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(r.Provider,{value:t},e.children)}},32385:(e,t,i)=>{i.d(t,{A:()=>s});const s=i.p+"assets/images/android-d941e94d5839760141de31c8446b67ce.svg"},51947:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"api/mobile/gsmSignal","title":"gsmSignal","description":"Set the GSM signal strength on the Android emulator.","source":"@site/docs/api/mobile/_gsmSignal.md","sourceDirName":"api/mobile","slug":"/api/mobile/gsmSignal","permalink":"/docs/api/mobile/gsmSignal","draft":false,"unlisted":false,"editUrl":"https://github.com/webdriverio/webdriverio/edit/main/packages/webdriverio/src/commands/mobile/gsmSignal.ts","tags":[],"version":"current","frontMatter":{"id":"gsmSignal","title":"gsmSignal","custom_edit_url":"https://github.com/webdriverio/webdriverio/edit/main/packages/webdriverio/src/commands/mobile/gsmSignal.ts"},"sidebar":"api","previous":{"title":"gsmCall","permalink":"/docs/api/mobile/gsmCall"},"next":{"title":"gsmVoice","permalink":"/docs/api/mobile/gsmVoice"}}');var n=i(86106),r=i(22002);const o={id:"gsmSignal",title:"gsmSignal",custom_edit_url:"https://github.com/webdriverio/webdriverio/edit/main/packages/webdriverio/src/commands/mobile/gsmSignal.ts"},l=void 0,a={},d=[{value:"Usage",id:"usage",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Example",id:"example",level:2},{value:"Support",id:"support",level:2}];function c(e){const t={a:"a",admonition:"admonition",blockquote:"blockquote",code:"code",h2:"h2",img:"img",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.p,{children:"Set the GSM signal strength on the Android emulator."}),"\n",(0,n.jsxs)(t.blockquote,{children:["\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Note:"})," Falls back to the deprecated Appium 2 protocol endpoint if the driver does not support the ",(0,n.jsx)(t.code,{children:"mobile:"})," execute method."]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-js",children:"await browser.gsmSignal(signalStrength)\n"})}),"\n",(0,n.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Details"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"signalStrength"})}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"number"})}),(0,n.jsxs)(t.td,{children:["The signal strength to set. Accepted values: ",(0,n.jsx)(t.code,{children:"0"})," (no signal), ",(0,n.jsx)(t.code,{children:"1"})," (very poor), ",(0,n.jsx)(t.code,{children:"2"})," (poor), ",(0,n.jsx)(t.code,{children:"3"})," (moderate), ",(0,n.jsx)(t.code,{children:"4"})," (good/full)"]})]})})]}),"\n",(0,n.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-js",metastring:'title="gsmSignal.js"',children:"it('should set GSM signal to full strength', async () => {\n await browser.gsmSignal(4)\n})\nit('should set GSM signal to no signal', async () => {\n await browser.gsmSignal(0)\n})\n"})}),"\n",(0,n.jsx)(t.h2,{id:"support",children:"Support"}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Support for android",src:i(32385).A+"",width:"512",height:"512"})}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.strong,{children:"Supported platforms:"})," Android"]}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["Refer to the official ",(0,n.jsx)(t.a,{href:"https://appium.io/docs/en/latest/ecosystem/",children:"Appium driver documentation"}
1)," to see which driver versions support this command."]})})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(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.