mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-01 17:27:45 +03:00
fix(web-test): clickElement normalizes ё in grid row text
Grid row search in findClickTargetScript used raw innerText without norm() — missed ё→е normalization. Target was normalized but row text was not, so "расчётным" didn't match "расчетным". Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e948d39adb
commit
4e0ce5ba0f
@@ -771,7 +771,7 @@ export function findClickTargetScript(formNum, text, { tableName, gridSelector }
|
||||
const lines = [...body.querySelectorAll('.gridLine')];
|
||||
for (const line of lines) {
|
||||
const textBoxes = [...line.querySelectorAll('.gridBoxText')].filter(b => b.offsetWidth > 0);
|
||||
const rowTexts = textBoxes.map(b => b.innerText?.trim() || '').filter(Boolean);
|
||||
const rowTexts = textBoxes.map(b => norm(b.innerText) || '').filter(Boolean);
|
||||
const firstCell = rowTexts[0]?.toLowerCase() || '';
|
||||
const rowText = rowTexts.join(' ').toLowerCase();
|
||||
if (firstCell === target || rowText === target || (target.length >= 4 && (firstCell.includes(target) || rowText.includes(target)))) {
|
||||
|
||||
Reference in New Issue
Block a user