优化文件路径
This commit is contained in:
parent
6e36aa1cd3
commit
3571f5fb0f
@ -341,7 +341,7 @@ class LongiMainPage extends BasePage {
|
||||
* @returns {Promise<Array>} 三级菜单项数组
|
||||
* @private
|
||||
*/
|
||||
async getThirdLevelMenus(parentMenu) {
|
||||
async findThirdLevelMenus(parentMenu) {
|
||||
// 检查三级菜单是否存在
|
||||
const elements = await this.page.locator('.el-popper.is-light.el-popover .menuTitle.canClick').all();
|
||||
if (elements.length === 0) {
|
||||
@ -379,7 +379,7 @@ class LongiMainPage extends BasePage {
|
||||
await this.page.waitForTimeout(500);
|
||||
|
||||
// 2. 获取三级菜单列表
|
||||
const thirdMenus = await this.getThirdLevelMenus(menu);
|
||||
const thirdMenus = await this.findThirdLevelMenus(menu);
|
||||
if (thirdMenus.length === 0) {
|
||||
console.log(`未找到三级菜单项`);
|
||||
return;
|
||||
@ -455,7 +455,7 @@ class LongiMainPage extends BasePage {
|
||||
}
|
||||
|
||||
console.log(`📑 ${menu.text} 找到 ${tabs.length} 个TAB页`);
|
||||
const tabInfos = await this.getTabInfos(tabs);
|
||||
const tabInfos = await this.findTabInfos(tabs);
|
||||
|
||||
for (const tabInfo of tabInfos) {
|
||||
if (!tabInfo.isActive) {
|
||||
@ -475,7 +475,7 @@ class LongiMainPage extends BasePage {
|
||||
* @returns {Promise<Array>} TAB页信息数组
|
||||
* @private
|
||||
*/
|
||||
async getTabInfos(tabs) {
|
||||
async findTabInfos(tabs) {
|
||||
return Promise.all(
|
||||
tabs.map(async element => ({
|
||||
text: await this.getTextByElement(element),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user