Procházet zdrojové kódy

More XPaths Bug Fix

pull/514/head
naibo před 2 měsíci
rodič
revize
7c0ab0e519
3 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. binární
      ElectronJS/EasySpider_en.crx
  2. binární
      ElectronJS/EasySpider_zh.crx
  3. +3
    -3
      Extension/manifest_v3/src/content-scripts/global.js

binární
ElectronJS/EasySpider_en.crx Zobrazit soubor


binární
ElectronJS/EasySpider_zh.crx Zobrazit soubor


+ 3
- 3
Extension/manifest_v3/src/content-scripts/global.js Zobrazit soubor

@ -57,13 +57,13 @@ export function getElementXPaths(element, parentElement = document.body) {
paths.push(pre_xpath + `id("${element.id}")`);
}
if (element.className) {
paths.push(pre_xpath + "//" + element.tagName + "[@class='" + element.className + "']");
paths.push(pre_xpath + "//" + element.tagName.toLowerCase() + "[@class='" + element.className + "']");
}
if (element.name) {
paths.push(pre_xpath + "//" + element.tagName + "[@name='" + element.name + "']");
paths.push(pre_xpath + "//" + element.tagName.toLowerCase() + "[@name='" + element.name + "']");
}
if (element.alt) {
paths.push(pre_xpath + "//" + element.tagName + "[@alt='" + element.alt + "']");
paths.push(pre_xpath + "//" + element.tagName.toLowerCase() + "[@alt='" + element.alt + "']");
}
paths.push(getAbsoluteXPathWithReverseIndex(element));
console.log("ALL PATHS: " + paths);

Načítá se…
Zrušit
Uložit