haystack/test/samples/crawler/page_dynamic_result.txt
Daniel Augustus Bichuetti Silva e3b2ee956a
Improved crawler support for dynamically loaded pages (#2710)
* Improved crawler support for dynamically loaded pages

* Reduced scope of StaleElementReferenceException and removed deprecated code from WebDriver initialization

* Improvements on crawler testing code

* Code format and style applied on f028331948c170448613e86dfdfa222f7c2043fd

* Update Documentation & Code Style

* Remove unused imports/parameters

Co-authored-by: Sara Zan <sara.zanzottera@deepset.ai>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 10:47:33 +02:00

28 lines
692 B
Plaintext

home page content
link to index
link to page 1
const updateTimeout = setTimeout(myUpdateFunction, 150);
function myUpdateFunction() {
const remElem = document.querySelector('#a2');
if (remElem)
remElem.parentNode.removeChild(remElem);
if (!document.querySelector('#a4')) {
const newElem = document.createElement('a');
newElem.href = 'page2.html';
newElem.id = 'a4';
newElem.innerText = 'link to page 2';
document.body.appendChild(newElem);
}
clearTimeout(updateTimeout);
}
link to page 2