mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-19 09:09:41 +03:00
feat(web-test): search all visible grids for clickElement row targets
Previously findClickTargetScript used querySelector (first grid only), making clickElement unable to find rows in second+ grids on multi-grid forms (e.g. system composition wizard). Now uses querySelectorAll to search all visible grids, and returns gridId so the tree node handler can locate the correct grid for expand/collapse. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1560,7 +1560,8 @@ export async function clickElement(text, { dblclick, table } = {}) {
|
||||
// Tree node: click the tree expand/collapse icon [tree="true"] for toggle
|
||||
const treeIconCoords = await page.evaluate(`(() => {
|
||||
const p = ${JSON.stringify(`form${formNum}_`)};
|
||||
const grid = document.querySelector('[id^="' + p + '"].grid');
|
||||
const gridSel = ${JSON.stringify(target.gridId ? '#' + target.gridId : null)};
|
||||
const grid = gridSel ? document.querySelector(gridSel) : document.querySelector('[id^="' + p + '"].grid');
|
||||
const body = grid?.querySelector('.gridBody');
|
||||
if (!body) return null;
|
||||
const lines = [...body.querySelectorAll('.gridLine')];
|
||||
|
||||
Reference in New Issue
Block a user