element.outerSwan

解释:同 element.swan,只是会获取到元素本身。

element.outerSwan(): Promise<string>

示例代码:

automator.launch().then(async smartProgram => {
    const page = await smartProgram.reLaunch('/pages/api/api');
    const element = await page.$('.group-logo');
    console.log(await element.outerSwan());
});