Update WEHAGO comparison data and tools

This commit is contained in:
b17301
2026-05-09 02:49:34 +09:00
parent b0b4647bb4
commit 7ceee2f897
44 changed files with 6296 additions and 135 deletions
@@ -0,0 +1,37 @@
import json
import os
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_experimental_option("debuggerAddress", os.environ.get("WEHAGO_CHROME_DEBUGGER_ADDRESS", "127.0.0.1:9225"))
driver = webdriver.Chrome(options=options)
driver.set_script_timeout(10)
script = r"""
const rg = Grids && Grids.realgrid;
const ids = [75, '75', 327, '327'];
const methods = ['getCurrent','fullItemCount','getColumns','getValues','getDataRow','getDisplayValues','getDisplayValuesOfRow','setCurrent','setSelectionItem','getSelectionItem','getSelectionItems'];
const out = {};
for (const m of methods) {
out[m] = [];
for (const id of ids) {
try {
if (!rg || typeof rg[m] !== 'function') { out[m].push({id, missing:true}); continue; }
let value;
if (m === 'getValues' || m === 'getDataRow' || m === 'getDisplayValues' || m === 'getDisplayValuesOfRow') value = rg[m](id, 0);
else if (m === 'setCurrent') value = rg[m](id, {itemIndex: 5, column: 'Code'});
else if (m === 'setSelectionItem') value = rg[m](id, 5);
else value = rg[m](id);
out[m].push({id, ok:true, value});
} catch(e) {
out[m].push({id, error:String(e).slice(0,300)});
}
}
}
return out;
"""
print(json.dumps(driver.execute_script(script), ensure_ascii=False, indent=2)[:80000])
driver.quit()