v1
1/4/2024 by h4ad -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
const cachedDocument = new WeakMap();

function absoluteToDocOld(doc, attributeValue) {
  if (!attributeValue || attributeValue.trim() === '') {
    return attributeValue;
  }

  const a = doc.createElement('a');
  a.href = attributeValue;
  return a.href;
}


function absoluteToDocNew(doc, attributeValue) {
  if (!attributeValue || attributeValue.trim() === '') {
    return attributeValue;
  }

  let a = cachedDocument.get(doc);

  if (!a) {
    a = doc.createElement('a');
    cachedDocument.set(doc, a);
  }

  // this is needed to work with SPA
  a.href = './clear-current'; // needed to reset any state
  a.href = ''; // reset to current URL

  a.href = attributeValue;

  return a.href;
}
delete caserun single casemove downdrag and drop case


ready



absoluteToDocOld(document, `./${ Math.random().toString(16).slice(2) }`)
delete caserun single casemove updrag and drop case


ready



absoluteToDocNew(document, `./${ Math.random().toString(16).slice(2) }`)
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN