Set focus on repeating dynamic layout on harness load
Hello,
I am trying to set focus on a repeating dynamic layout upon click of the Teams menu item in the navigation panel. I see the console log alerts in DevTools but the focus is not attaching to the element. I tried using the script below. The data-test-id below is the test ID for the first dynamic layout.
Is it possible to set focus on a repeating dynamic layout?
setTimeout(function(){ console.log("setTimeout Worked"); document.querySelectorAll('[data-test-id="201805090929170779614-1"]')[0].focus();
}, 1000); console.log("it set focus on dynamic layout");