page.data解釋:獲取頁(yè)面渲染數(shù)據(jù)。page.data(path?: string): Promise<Object> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明pathString否-數(shù)據(jù)路徑示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.currentPage(); const data = awai...
http://m.o2fo.com/baiduapp/baiduapp-wv393bat.htmlpage.size解釋:獲取頁(yè)面大小。page.size(): Promise<Object> Object 返回參數(shù)說(shuō)明:參數(shù)類型說(shuō)明widthNumber頁(yè)面可滾動(dòng)寬度heightNumber頁(yè)面可滾動(dòng)高度示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.currentPage(); co...
http://m.o2fo.com/baiduapp/baiduapp-754t3bau.htmlelement.$解釋:在元素范圍內(nèi)獲取元素。element.$(selector: string): Promise<Element> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/...
http://m.o2fo.com/baiduapp/baiduapp-cjqb3baw.htmlelement.$$解釋:在元素范圍內(nèi)獲取元素?cái)?shù)組。element.$$(selector: string): Promise<Element[]> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch(...
http://m.o2fo.com/baiduapp/baiduapp-m93y3bax.htmlelement.offset解釋:獲取元素絕對(duì)位置。element.offset(): Promise<Object> Object 返回參數(shù)說(shuō)明:參數(shù)類型說(shuō)明leftNumber左上角 x 坐標(biāo),單位:pxtopNumber左上角 y 坐標(biāo),單位:px坐標(biāo)信息以頁(yè)面左上角為原點(diǎn)。示例代碼:automator.launch().then(...
http://m.o2fo.com/baiduapp/baiduapp-5k1t3bay.htmlelement.size解釋:獲取元素大小。element.size(): Promise<Object> Object 返回參數(shù)說(shuō)明:參數(shù)類型說(shuō)明widthNumber元素寬度heightNumber元素高度示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api&...
http://m.o2fo.com/baiduapp/baiduapp-ensk3baz.htmlelement.attribute解釋:獲取元素屬性。element.attribute(name: string): Promise<string> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明nameString是-屬性名示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/a...
http://m.o2fo.com/baiduapp/baiduapp-yecf3bb1.html解釋:獲取元素 swan 內(nèi)容。element.swan(): Promise<string> 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api'); const element = await page.$('.group-logo'); const res = await element.swan(); });
http://m.o2fo.com/baiduapp/baiduapp-t1jo3bb2.htmlelement.outerSwan解釋:同 element.swan,只是會(huì)獲取到元素本身。element.outerSwan(): Promise<string> 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api'); const element = await page.$('.group-logo...
http://m.o2fo.com/baiduapp/baiduapp-e8os3bb3.htmlelement.value解釋:獲取元素值。element.value(): Promise<string> 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/input/input'); const element = await page.$('.small-ipt'); const res = await element.value...
http://m.o2fo.com/baiduapp/baiduapp-sfnw3bb4.html抱歉,暫時(shí)沒有相關(guān)的微課
w3cschool 建議您:
抱歉,暫時(shí)沒有相關(guān)的視頻課程
w3cschool 建議您:
抱歉,暫時(shí)沒有相關(guān)的教程
w3cschool 建議您:
page.data解釋:獲取頁(yè)面渲染數(shù)據(jù)。page.data(path?: string): Promise<Object> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明pathString否-數(shù)據(jù)路徑示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.currentPage(); const data = awai...
http://m.o2fo.com/baiduapp/baiduapp-wv393bat.htmlpage.size解釋:獲取頁(yè)面大小。page.size(): Promise<Object> Object 返回參數(shù)說(shuō)明:參數(shù)類型說(shuō)明widthNumber頁(yè)面可滾動(dòng)寬度heightNumber頁(yè)面可滾動(dòng)高度示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.currentPage(); co...
http://m.o2fo.com/baiduapp/baiduapp-754t3bau.htmlelement.$解釋:在元素范圍內(nèi)獲取元素。element.$(selector: string): Promise<Element> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/...
http://m.o2fo.com/baiduapp/baiduapp-cjqb3baw.htmlelement.$$解釋:在元素范圍內(nèi)獲取元素?cái)?shù)組。element.$$(selector: string): Promise<Element[]> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明selectorString是-選擇器示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch(...
http://m.o2fo.com/baiduapp/baiduapp-m93y3bax.htmlelement.offset解釋:獲取元素絕對(duì)位置。element.offset(): Promise<Object> Object 返回參數(shù)說(shuō)明:參數(shù)類型說(shuō)明leftNumber左上角 x 坐標(biāo),單位:pxtopNumber左上角 y 坐標(biāo),單位:px坐標(biāo)信息以頁(yè)面左上角為原點(diǎn)。示例代碼:automator.launch().then(...
http://m.o2fo.com/baiduapp/baiduapp-5k1t3bay.htmlelement.size解釋:獲取元素大小。element.size(): Promise<Object> Object 返回參數(shù)說(shuō)明:參數(shù)類型說(shuō)明widthNumber元素寬度heightNumber元素高度示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api&...
http://m.o2fo.com/baiduapp/baiduapp-ensk3baz.htmlelement.attribute解釋:獲取元素屬性。element.attribute(name: string): Promise<string> 參數(shù)說(shuō)明:屬性名類型必填默認(rèn)值說(shuō)明nameString是-屬性名示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/a...
http://m.o2fo.com/baiduapp/baiduapp-yecf3bb1.html解釋:獲取元素 swan 內(nèi)容。element.swan(): Promise<string> 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api'); const element = await page.$('.group-logo'); const res = await element.swan(); });
http://m.o2fo.com/baiduapp/baiduapp-t1jo3bb2.htmlelement.outerSwan解釋:同 element.swan,只是會(huì)獲取到元素本身。element.outerSwan(): Promise<string> 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/api/api'); const element = await page.$('.group-logo...
http://m.o2fo.com/baiduapp/baiduapp-e8os3bb3.htmlelement.value解釋:獲取元素值。element.value(): Promise<string> 示例代碼:automator.launch().then(async smartProgram => { const page = await smartProgram.reLaunch('/pages/input/input'); const element = await page.$('.small-ipt'); const res = await element.value...
http://m.o2fo.com/baiduapp/baiduapp-sfnw3bb4.html抱歉,暫時(shí)沒有相關(guān)的文章
w3cschool 建議您: