element.tagName

解释:标签名,小写。

element.tagName: string

示例代码:

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